ReactOS  0.4.15-dev-2153-g62b4c61
bitset< _Nb >::reference Struct Reference

#include <_bitset.h>

Public Types

typedef _STLP_PRIV _Base_bitset< _Words_Bitset_base
 
typedef bitset< _Nb > _Bitset
 

Public Member Functions

 reference ()
 
 reference (_Bitset &__b, size_t __pos)
 
 ~reference ()
 
referenceoperator= (bool __x)
 
referenceoperator= (const reference &__j)
 
bool operator~ () const
 
 operator bool () const
 
referenceflip ()
 

Public Attributes

_WordT_M_wp
 
size_t _M_bpos
 

Detailed Description

template<size_t _Nb>
struct bitset< _Nb >::reference

Definition at line 363 of file _bitset.h.

Member Typedef Documentation

◆ _Bitset

template<size_t _Nb>
typedef bitset<_Nb> bitset< _Nb >::reference::_Bitset

Definition at line 365 of file _bitset.h.

◆ _Bitset_base

template<size_t _Nb>
typedef _STLP_PRIV _Base_bitset<_Words > bitset< _Nb >::reference::_Bitset_base

Definition at line 364 of file _bitset.h.

Constructor & Destructor Documentation

◆ reference() [1/2]

template<size_t _Nb>
bitset< _Nb >::reference::reference ( )
inline

Definition at line 371 of file _bitset.h.

371 {}

◆ reference() [2/2]

template<size_t _Nb>
bitset< _Nb >::reference::reference ( _Bitset __b,
size_t  __pos 
)
inline

Definition at line 373 of file _bitset.h.

373  {
374  _M_wp = &__b._M_getword(__pos);
375  _M_bpos = _Bitset_base::_S_whichbit(__pos);
376  }
_WordT * _M_wp
Definition: _bitset.h:367
size_t _M_bpos
Definition: _bitset.h:368

◆ ~reference()

template<size_t _Nb>
bitset< _Nb >::reference::~reference ( )
inline

Definition at line 379 of file _bitset.h.

379 {}

Member Function Documentation

◆ flip()

template<size_t _Nb>
reference& bitset< _Nb >::reference::flip ( )
inline

Definition at line 408 of file _bitset.h.

408  {
409  *_M_wp ^= _Bitset_base::_S_maskbit(_M_bpos);
410  return *this;
411  }
_WordT * _M_wp
Definition: _bitset.h:367
size_t _M_bpos
Definition: _bitset.h:368

◆ operator bool()

template<size_t _Nb>
bitset< _Nb >::reference::operator bool ( ) const
inline

Definition at line 405 of file _bitset.h.

405 { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) != 0; }
_WordT * _M_wp
Definition: _bitset.h:367
size_t _M_bpos
Definition: _bitset.h:368

◆ operator=() [1/2]

template<size_t _Nb>
reference& bitset< _Nb >::reference::operator= ( bool  __x)
inline

Definition at line 382 of file _bitset.h.

382  {
383  if ( __x )
384  *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
385  else
386  *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
387 
388  return *this;
389  }
_WordT * _M_wp
Definition: _bitset.h:367
_STLP_PRIV _Base_bitset< _Words > _Bitset_base
Definition: _bitset.h:364
size_t _M_bpos
Definition: _bitset.h:368

◆ operator=() [2/2]

template<size_t _Nb>
reference& bitset< _Nb >::reference::operator= ( const reference __j)
inline

Definition at line 392 of file _bitset.h.

392  {
393  if ( (*(__j._M_wp) & _Bitset_base::_S_maskbit(__j._M_bpos)) )
394  *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
395  else
396  *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
397 
398  return *this;
399  }
_WordT * _M_wp
Definition: _bitset.h:367
_STLP_PRIV _Base_bitset< _Words > _Bitset_base
Definition: _bitset.h:364
size_t _M_bpos
Definition: _bitset.h:368

◆ operator~()

template<size_t _Nb>
bool bitset< _Nb >::reference::operator~ ( ) const
inline

Definition at line 402 of file _bitset.h.

402 { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) == 0; }
_WordT * _M_wp
Definition: _bitset.h:367
size_t _M_bpos
Definition: _bitset.h:368

Member Data Documentation

◆ _M_bpos

◆ _M_wp


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