ReactOS 0.4.15-dev-7712-gbbbcd8e
__BVECTOR_QUALIFIED Class Reference

#include <_bvector.h>

Inheritance diagram for __BVECTOR_QUALIFIED:
Collaboration diagram for __BVECTOR_QUALIFIED:

Public Types

typedef bool value_type
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef _STLP_PRIV _Bit_reference reference
 
typedef bool const_reference
 
typedef _STLP_PRIV _Bit_referencepointer
 
typedef const boolconst_pointer
 
typedef random_access_iterator_tag _Iterator_category
 
typedef _STLP_PRIV _Bit_iterator iterator
 
typedef _STLP_PRIV _Bit_const_iterator const_iterator
 
typedef _STLP_PRIV _Bvector_base< _Alloc >::allocator_type allocator_type
 
typedef _STLP_PRIV _Bvector_base< _Alloc >::__chunk_type __chunk_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_type size () const
 
size_type max_size () const
 
size_type capacity () const
 
bool empty () const
 
reference operator[] (size_type __n)
 
const_reference operator[] (size_type __n) const
 
void _M_range_check (size_type __n) const
 
reference at (size_type __n)
 
const_reference at (size_type __n) const
 
 __BVECTOR (const allocator_type &__a=allocator_type())
 
 __BVECTOR (size_type __n, bool __val, const allocator_type &__a=allocator_type())
 
 __BVECTOR (size_type __n)
 
 __BVECTOR (const _Self &__x)
 
 __BVECTOR (const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
 
 __BVECTOR (const bool *__first, const bool *__last, const allocator_type &__a=allocator_type())
 
 __BVECTOR (__move_source< _Self > src)
 
 ~__BVECTOR ()
 
__BVECTOR_QUALIFIEDoperator= (const __BVECTOR_QUALIFIED &__x)
 
void _M_fill_assign (size_t __n, bool __x)
 
void assign (size_t __n, bool __x)
 
void reserve (size_type __n)
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
void push_back (bool __x)
 
void swap (__BVECTOR_QUALIFIED &__x)
 
iterator insert (iterator __position, bool __x=bool())
 
void insert (iterator __position, const_iterator __first, const_iterator __last)
 
void insert (iterator __position, const bool *__first, const bool *__last)
 
void _M_fill_insert (iterator __position, size_type __n, bool __x)
 
void insert (iterator __position, size_type __n, bool __x)
 
void pop_back ()
 
iterator erase (iterator __position)
 
iterator erase (iterator __first, iterator __last)
 
void resize (size_type __new_size, bool __x=bool())
 
void flip ()
 
void clear ()
 

Public Attributes

 _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS
 

Protected Member Functions

void _M_initialize (size_type __n)
 
void _M_insert_aux (iterator __position, bool __x)
 

Private Types

typedef _STLP_PRIV _Bvector_base< _Alloc_Base
 
typedef __BVECTOR_QUALIFIED _Self
 

Detailed Description

Definition at line 358 of file _bvector.h.

Member Typedef Documentation

◆ __chunk_type

Definition at line 385 of file _bvector.h.

◆ _Base

Definition at line 363 of file _bvector.h.

◆ _Iterator_category

◆ _Self

Definition at line 364 of file _bvector.h.

◆ allocator_type

Definition at line 384 of file _bvector.h.

◆ const_iterator

◆ const_pointer

Definition at line 372 of file _bvector.h.

◆ const_reference

Definition at line 370 of file _bvector.h.

◆ difference_type

Definition at line 368 of file _bvector.h.

◆ iterator

◆ pointer

◆ reference

◆ size_type

Definition at line 367 of file _bvector.h.

◆ value_type

Definition at line 366 of file _bvector.h.

Constructor & Destructor Documentation

◆ ~__BVECTOR()

__BVECTOR_QUALIFIED::~__BVECTOR ( )
inline

Definition at line 579 of file _bvector.h.

579{}

Member Function Documentation

◆ __BVECTOR() [1/7]

__BVECTOR_QUALIFIED::__BVECTOR ( __move_source< _Self src)
inline

Definition at line 575 of file _bvector.h.

#define _STLP_PRIV
Definition: _dm.h:70
GLenum src
Definition: glext.h:6340

◆ __BVECTOR() [2/7]

__BVECTOR_QUALIFIED::__BVECTOR ( const _Self __x)
inline

Definition at line 523 of file _bvector.h.

524 : _STLP_PRIV _Bvector_base<_Alloc >(__x.get_allocator()) {
525 _M_initialize(__x.size());
526 _STLP_STD::copy(__x.begin(), __x.end(), this->_M_start);
527 }
void _M_initialize(size_type __n)
Definition: _bvector.h:390

◆ __BVECTOR() [3/7]

__BVECTOR_QUALIFIED::__BVECTOR ( const allocator_type __a = allocator_type())
inlineexplicit

Definition at line 507 of file _bvector.h.

◆ __BVECTOR() [4/7]

__BVECTOR_QUALIFIED::__BVECTOR ( const bool __first,
const bool __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 565 of file _bvector.h.

568 size_type __n = _STLP_STD::distance(__first, __last);
570 _STLP_STD::copy(__first, __last, this->_M_start);
571 }
_STLP_INLINE_LOOP _InputIter __last
Definition: _algo.h:68
return __n
Definition: _algo.h:75

◆ __BVECTOR() [5/7]

__BVECTOR_QUALIFIED::__BVECTOR ( const_iterator  __first,
const_iterator  __last,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 558 of file _bvector.h.

561 size_type __n = _STLP_STD::distance(__first, __last);
563 _STLP_STD::copy(__first, __last, this->_M_start);
564 }

◆ __BVECTOR() [6/7]

__BVECTOR_QUALIFIED::__BVECTOR ( size_type  __n)
inlineexplicit

Definition at line 517 of file _bvector.h.

520 fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), 0);
521 }
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
Definition: _algobase.h:449
_STLP_PRIV _Bvector_base< _Alloc >::allocator_type allocator_type
Definition: _bvector.h:384

◆ __BVECTOR() [7/7]

__BVECTOR_QUALIFIED::__BVECTOR ( size_type  __n,
bool  __val,
const allocator_type __a = allocator_type() 
)
inline

Definition at line 510 of file _bvector.h.

514 fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __val ? ~0 : 0);
515 }
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656

◆ _M_fill_assign()

void __BVECTOR_QUALIFIED::_M_fill_assign ( size_t  __n,
bool  __x 
)
inline

Definition at line 597 of file _bvector.h.

597 {
598 if (__n > size()) {
599 fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
600 insert(end(), __n - size(), __x);
601 }
602 else {
603 erase(begin() + __n, end());
604 fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
605 }
606 }
iterator erase(iterator __position)
Definition: _bvector.h:790
GLuint GLuint end
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
static clock_t begin
Definition: xmllint.c:458
static int insert
Definition: xmllint.c:138

Referenced by assign().

◆ _M_fill_insert()

void __BVECTOR_QUALIFIED::_M_fill_insert ( iterator  __position,
size_type  __n,
bool  __x 
)
inline

Definition at line 763 of file _bvector.h.

763 {
764 if (__n == 0) return;
765 if (capacity() - size() >= __n) {
766 _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + difference_type(__n),
767 random_access_iterator_tag(), (difference_type*)0 );
768 fill(__position, __position + difference_type(__n), __x);
769 this->_M_finish += difference_type(__n);
770 }
771 else {
772 size_type __len = size() + (max)(size(), __n);
773 __chunk_type* __q = this->_M_bit_alloc(__len);
774 iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
775 fill_n(__i, __n, __x);
776 this->_M_finish = _STLP_STD::copy(__position, end(), __i + difference_type(__n));
777 this->_M_deallocate();
778 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
779 this->_M_start = iterator(__q, 0);
780 }
781 }
#define random_access_iterator_tag
Definition: _abbrevs.h:28
_BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last, _BidirectionalIter2 __result, const bidirectional_iterator_tag &, _Distance *)
Definition: _algobase.h:232
_STLP_MOVE_TO_STD_NAMESPACE void fill_n(_OutputIter __first, _Size __n, const _Tp &__val)
Definition: _algobase.h:511
_STLP_PRIV _Bvector_base< _Alloc >::__chunk_type __chunk_type
Definition: _bvector.h:385
size_type capacity() const
Definition: _bvector.h:488
ptrdiff_t difference_type
Definition: _bvector.h:368
#define max(a, b)
Definition: svc.c:63

Referenced by insert().

◆ _M_initialize()

void __BVECTOR_QUALIFIED::_M_initialize ( size_type  __n)
inlineprotected

Definition at line 390 of file _bvector.h.

390 {
391 __chunk_type* __q = this->_M_bit_alloc(__n);
392 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__n);
393 this->_M_start = iterator(__q, 0);
394 this->_M_finish = this->_M_start + difference_type(__n);
395 }

Referenced by __BVECTOR(), and operator=().

◆ _M_insert_aux()

void __BVECTOR_QUALIFIED::_M_insert_aux ( iterator  __position,
bool  __x 
)
inlineprotected

Definition at line 396 of file _bvector.h.

396 {
397 if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
398 _STLP_PRIV __copy_backward(__position, this->_M_finish, this->_M_finish + 1,
399 random_access_iterator_tag(), (difference_type*)0 );
400 *__position = __x;
401 ++this->_M_finish;
402 }
403 else {
404 size_type __len = size() ? 2 * size() : _STLP_WORD_BIT;
405 __chunk_type* __q = this->_M_bit_alloc(__len);
406 iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
407 *__i++ = __x;
408 this->_M_finish = _STLP_STD::copy(__position, end(), __i);
409 this->_M_deallocate();
410 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
411 this->_M_start = iterator(__q, 0);
412 }
413 }
#define _STLP_WORD_BIT
Definition: _bvector.h:37

Referenced by insert(), and push_back().

◆ _M_range_check()

void __BVECTOR_QUALIFIED::_M_range_check ( size_type  __n) const
inline

Definition at line 497 of file _bvector.h.

497 {
498 if (__n >= this->size())
499 __stl_throw_range_error("vector<bool>");
500 }
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_range_error(const char *__msg)
Definition: _range_errors.c:66

Referenced by at().

◆ assign()

void __BVECTOR_QUALIFIED::assign ( size_t  __n,
bool  __x 
)
inline

Definition at line 607 of file _bvector.h.

607{ _M_fill_assign(__n, __x); }
void _M_fill_assign(size_t __n, bool __x)
Definition: _bvector.h:597

◆ at() [1/2]

reference __BVECTOR_QUALIFIED::at ( size_type  __n)
inline

Definition at line 502 of file _bvector.h.

503 { _M_range_check(__n); return (*this)[__n]; }
void _M_range_check(size_type __n) const
Definition: _bvector.h:497

◆ at() [2/2]

const_reference __BVECTOR_QUALIFIED::at ( size_type  __n) const
inline

Definition at line 504 of file _bvector.h.

505 { _M_range_check(__n); return (*this)[__n]; }

◆ back() [1/2]

reference __BVECTOR_QUALIFIED::back ( )
inline

Definition at line 666 of file _bvector.h.

666{ return *(end() - 1); }

◆ back() [2/2]

const_reference __BVECTOR_QUALIFIED::back ( ) const
inline

Definition at line 667 of file _bvector.h.

667{ return *(end() - 1); }

◆ begin() [1/2]

iterator __BVECTOR_QUALIFIED::begin ( )
inline

Definition at line 472 of file _bvector.h.

472{ return this->_M_start; }

Referenced by __BVECTOR(), and operator=().

◆ begin() [2/2]

const_iterator __BVECTOR_QUALIFIED::begin ( ) const
inline

Definition at line 473 of file _bvector.h.

473{ return this->_M_start; }

◆ capacity()

size_type __BVECTOR_QUALIFIED::capacity ( ) const
inline

Definition at line 488 of file _bvector.h.

488 {
489 return size_type(const_iterator(this->_M_end_of_storage._M_data, 0) - begin());
490 }
_STLP_PRIV _Bit_const_iterator const_iterator
Definition: _bvector.h:376

Referenced by _M_fill_insert(), insert(), operator=(), and reserve().

◆ clear()

void __BVECTOR_QUALIFIED::clear ( )
inline

Definition at line 811 of file _bvector.h.

811{ erase(begin(), end()); }

◆ empty()

bool __BVECTOR_QUALIFIED::empty ( ) const
inline

Definition at line 491 of file _bvector.h.

491{ return begin() == end(); }

◆ end() [1/2]

iterator __BVECTOR_QUALIFIED::end ( )
inline

Definition at line 474 of file _bvector.h.

474{ return this->_M_finish; }

Referenced by __BVECTOR(), and operator=().

◆ end() [2/2]

const_iterator __BVECTOR_QUALIFIED::end ( ) const
inline

Definition at line 475 of file _bvector.h.

475{ return this->_M_finish; }

◆ erase() [1/2]

iterator __BVECTOR_QUALIFIED::erase ( iterator  __first,
iterator  __last 
)
inline

Definition at line 796 of file _bvector.h.

796 {
797 this->_M_finish = _STLP_STD::copy(__last, end(), __first);
798 return __first;
799 }

◆ erase() [2/2]

iterator __BVECTOR_QUALIFIED::erase ( iterator  __position)
inline

Definition at line 790 of file _bvector.h.

790 {
791 if (__position + 1 != end())
792 _STLP_STD::copy(__position + 1, end(), __position);
793 --this->_M_finish;
794 return __position;
795 }

Referenced by _M_fill_assign(), clear(), and resize().

◆ flip()

void __BVECTOR_QUALIFIED::flip ( )
inline

Definition at line 806 of file _bvector.h.

806 {
807 for (__chunk_type* __p = this->_M_start._M_p; __p != this->_M_end_of_storage._M_data; ++__p)
808 *__p = ~*__p;
809 }

◆ front() [1/2]

reference __BVECTOR_QUALIFIED::front ( )
inline

Definition at line 664 of file _bvector.h.

664{ return *begin(); }

◆ front() [2/2]

const_reference __BVECTOR_QUALIFIED::front ( ) const
inline

Definition at line 665 of file _bvector.h.

665{ return *begin(); }

◆ insert() [1/4]

iterator __BVECTOR_QUALIFIED::insert ( iterator  __position,
bool  __x = bool() 
)
inline

Definition at line 685 of file _bvector.h.

685 {
686 difference_type __n = __position - begin();
687 if (this->_M_finish._M_p != this->_M_end_of_storage._M_data && __position == end()) {
688 *(this->_M_finish) = __x;
689 ++this->_M_finish;
690 }
691 else
692 _M_insert_aux(__position, __x);
693 return begin() + __n;
694 }
void _M_insert_aux(iterator __position, bool __x)
Definition: _bvector.h:396

◆ insert() [2/4]

void __BVECTOR_QUALIFIED::insert ( iterator  __position,
const bool __first,
const bool __last 
)
inline

Definition at line 741 of file _bvector.h.

741 {
742 if (__first == __last) return;
743 size_type __n = _STLP_STD::distance(__first, __last);
744 if (capacity() - size() >= __n) {
745 _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + __n,
746 random_access_iterator_tag(), (difference_type*)0 );
747 _STLP_STD::copy(__first, __last, __position);
748 this->_M_finish += __n;
749 }
750 else {
751 size_type __len = size() + (max)(size(), __n);
752 __chunk_type* __q = this->_M_bit_alloc(__len);
753 iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
754 __i = _STLP_STD::copy(__first, __last, __i);
755 this->_M_finish = _STLP_STD::copy(__position, end(), __i);
756 this->_M_deallocate();
757 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
758 this->_M_start = iterator(__q, 0);
759 }
760 }

◆ insert() [3/4]

void __BVECTOR_QUALIFIED::insert ( iterator  __position,
const_iterator  __first,
const_iterator  __last 
)
inline

Definition at line 719 of file _bvector.h.

720 {
721 if (__first == __last) return;
722 size_type __n = _STLP_STD::distance(__first, __last);
723 if (capacity() - size() >= __n) {
724 _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + __n,
725 random_access_iterator_tag(), (difference_type*)0 );
726 _STLP_STD::copy(__first, __last, __position);
727 this->_M_finish += __n;
728 }
729 else {
730 size_type __len = size() + (max)(size(), __n);
731 __chunk_type* __q = this->_M_bit_alloc(__len);
732 iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
733 __i = _STLP_STD::copy(__first, __last, __i);
734 this->_M_finish = _STLP_STD::copy(__position, end(), __i);
735 this->_M_deallocate();
736 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
737 this->_M_start = iterator(__q, 0);
738 }
739 }

◆ insert() [4/4]

void __BVECTOR_QUALIFIED::insert ( iterator  __position,
size_type  __n,
bool  __x 
)
inline

Definition at line 783 of file _bvector.h.

783 {
784 _M_fill_insert(__position, __n, __x);
785 }
void _M_fill_insert(iterator __position, size_type __n, bool __x)
Definition: _bvector.h:763

◆ max_size()

size_type __BVECTOR_QUALIFIED::max_size ( ) const
inline

Definition at line 487 of file _bvector.h.

487{ return size_type(-1); }

◆ operator=()

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

Definition at line 581 of file _bvector.h.

581 {
582 if (&__x == this) return *this;
583 if (__x.size() > capacity()) {
584 this->_M_deallocate();
585 _M_initialize(__x.size());
586 }
587 _STLP_STD::copy(__x.begin(), __x.end(), begin());
588 this->_M_finish = begin() + difference_type(__x.size());
589 return *this;
590 }
size_type size() const
Definition: _bvector.h:486
iterator end()
Definition: _bvector.h:474
iterator begin()
Definition: _bvector.h:472

◆ operator[]() [1/2]

reference __BVECTOR_QUALIFIED::operator[] ( size_type  __n)
inline

Definition at line 492 of file _bvector.h.

493 { return *(begin() + difference_type(__n)); }

◆ operator[]() [2/2]

const_reference __BVECTOR_QUALIFIED::operator[] ( size_type  __n) const
inline

Definition at line 494 of file _bvector.h.

495 { return *(begin() + difference_type(__n)); }

◆ pop_back()

void __BVECTOR_QUALIFIED::pop_back ( )
inline

Definition at line 787 of file _bvector.h.

787 {
788 --this->_M_finish;
789 }

◆ push_back()

void __BVECTOR_QUALIFIED::push_back ( bool  __x)
inline

Definition at line 668 of file _bvector.h.

668 {
669 if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
670 *(this->_M_finish) = __x;
671 ++this->_M_finish;
672 }
673 else
674 _M_insert_aux(end(), __x);
675 }

◆ rbegin() [1/2]

reverse_iterator __BVECTOR_QUALIFIED::rbegin ( )
inline

Definition at line 477 of file _bvector.h.

477{ return reverse_iterator(end()); }
#define reverse_iterator
Definition: _abbrevs.h:34

◆ rbegin() [2/2]

const_reverse_iterator __BVECTOR_QUALIFIED::rbegin ( ) const
inline

Definition at line 478 of file _bvector.h.

478 {
479 return const_reverse_iterator(end());
480 }

◆ rend() [1/2]

reverse_iterator __BVECTOR_QUALIFIED::rend ( )
inline

Definition at line 481 of file _bvector.h.

481{ return reverse_iterator(begin()); }

◆ rend() [2/2]

const_reverse_iterator __BVECTOR_QUALIFIED::rend ( ) const
inline

Definition at line 482 of file _bvector.h.

482 {
483 return const_reverse_iterator(begin());
484 }

◆ reserve()

void __BVECTOR_QUALIFIED::reserve ( size_type  __n)
inline

Definition at line 651 of file _bvector.h.

651 {
652 if (capacity() < __n) {
653 if (max_size() < __n)
654 __stl_throw_length_error("vector<bool>");
655 __chunk_type* __q = this->_M_bit_alloc(__n);
656 _STLP_PRIV _Bit_iterator __z(__q, 0);
657 this->_M_finish = _STLP_STD::copy(begin(), end(), __z);
658 this->_M_deallocate();
659 this->_M_start = iterator(__q, 0);
660 this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__n);
661 }
662 }
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_length_error(const char *__msg)
Definition: _range_errors.c:72
static INT max_size
Definition: history.c:51

◆ resize()

void __BVECTOR_QUALIFIED::resize ( size_type  __new_size,
bool  __x = bool() 
)
inline

Definition at line 800 of file _bvector.h.

800 {
801 if (__new_size < size())
802 erase(begin() + difference_type(__new_size), end());
803 else
804 insert(end(), __new_size - size(), __x);
805 }

◆ size()

size_type __BVECTOR_QUALIFIED::size ( ) const
inline

Definition at line 486 of file _bvector.h.

486{ return size_type(end() - begin()); }

Referenced by __BVECTOR(), and operator=().

◆ swap()

void __BVECTOR_QUALIFIED::swap ( __BVECTOR_QUALIFIED __x)
inline

Definition at line 676 of file _bvector.h.

676 {
677 _STLP_STD::swap(this->_M_start, __x._M_start);
678 _STLP_STD::swap(this->_M_finish, __x._M_finish);
679 this->_M_end_of_storage.swap(__x._M_end_of_storage);
680 }

Member Data Documentation

◆ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS

__BVECTOR_QUALIFIED::_STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS

Definition at line 378 of file _bvector.h.


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