__gnu_debug_def::bitset(3)

NAME

__gnu_debug_def::bitset

SYNOPSIS

Inherits    std::bitset<    Nb    ><     Nb     >,     and
__gnu_debug::Safe_sequence_base.
Public Member Functions
bitset ()
    All bits set to zero.
bitset (unsigned long __val)
    Initial bits bitwise-copied from a single word (others
set to zero).
template<typename CharT, typename Traits, typename Allocator>  bitset (const std::basic_string< CharT, Traits, Allocator >
&str,  typename  std::basic_string<  CharT,   Traits,   Allocator
>::size_type   position=0,   typename  std::basic_string<  CharT,
Traits,  Allocator  >::size_type   n=(std::basic_string<   CharT,
Traits, Allocator >::npos))
bitset (const Base &x)
bitset< Nb > & operator &= (const bitset< Nb > &__rhs)
bitset< Nb > & operator|= (const bitset< Nb > &__rhs)
bitset< Nb > & operator^= (const bitset< Nb > &__rhs)
bitset< Nb > & operator<<= (size_t position)
    Operations on bitsets.
bitset< Nb > & operator>>= (size_t position)
    Operations on bitsets.
bitset< Nb > & set ()
    Sets every bit to true.
bitset< Nb > & set (size_t position, bool __val=true)
    Sets a given bit to a particular value.
bitset< Nb > & reset ()
    Sets every bit to false.
bitset< Nb > & reset (size_t position)
    Sets a given bit to false.
bitset< Nb > operator~ () const
    See the no-argument flip().
bitset< Nb > & flip ()
    Toggles every bit to its opposite value.
bitset< Nb > & flip (size_t position)
    Toggles a given bit to its opposite value.
reference operator[] (size_t position)
    Array-indexing support.
bool operator[] (size_t position) const
    Array-indexing support.
template<typename   CharT,   typename   Traits,   typename

Allocator> std::basic_string< CharT, Traits, Allocator >

to_string () const
Retuns a character interpretation of the bitset.
bool operator== (const bitset< Nb > &__rhs) const bool operator!= (const bitset< Nb > &__rhs) const bitset< Nb > operator<< (size_t position) const
Self-explanatory.
bitset< Nb > operator>> (size_t position) const
Self-explanatory.
Base & M_base ()
const Base & M_base () const unsigned long to_ulong () const
Retuns a numerical interpretation of the bitset.
template<class CharT, class Traits, class Alloc> void

M_copy_from_string (const basic_string< CharT, Traits, Alloc >

&s, size_t, size_t)
template<class CharT, class Traits, class Alloc> void

M_copy_to_string (basic_string< CharT, Traits, Alloc > &) const

size_t count () const
Returns the number of bits which are set.
size_t size () const
Returns the total number of bits.
bool test (size_t position) const
Tests the value of a bit.
bool any () const
Tests whether any of the bits are on.
bool none () const
Tests whether any of the bits are on.
size_t Find_first () const
Finds the index of the first 'on' bit.
size_t Find_next (size_t __prev) const
Finds the index of the next 'on' bit after prev.
void M_invalidate_all () const

bitset< Nb > & operator &= (const bitset< Nb > &__rhs)
Operations on bitsets.
bitset< Nb > & operator|= (const bitset< Nb > &__rhs)
Operations on bitsets.
bitset< Nb > & operator^= (const bitset< Nb > &__rhs)
Operations on bitsets.
bitset< Nb > & Unchecked_set (size_t position) bitset< Nb > & Unchecked_set (size_t position, int
__val)
bitset< Nb > & Unchecked_reset (size_t position) bitset< Nb > & Unchecked_flip (size_t position) bool Unchecked_test (size_t position) const
bool operator== (const bitset< Nb > &__rhs) const
These comparisons for equality/inequality are,
well, bitwise.
bool operator!= (const bitset< Nb > &__rhs) const
These comparisons for equality/inequality are,
well, bitwise.
Public Attributes
Safe_iterator_base * M_iterators
The list of mutable iterators that reference this
container.
Safe_iterator_base * M_const_iterators
The list of constant iterators that reference this
container.
unsigned int M_version
The container version number. This number may never be
0.
Protected Member Functions
void M_detach_all ()
void M_detach_singular ()
void M_revalidate_singular () void M_swap (Safe_sequence_base &x)
Private Types
typedef std::bitset< Nb > Base
typedef __gnu_debug::Safe_sequence_base Safe_base
Friends
class reference
Classes
class reference

Detailed Description

template<size_t Nb> class __gnu_debug_def::bitset< Nb >
Definition at line 41 of file debug/bitset.

Constructor & Destructor Documentation

template<size_t Nb> __gnu_debug_def::bitset< Nb >::bitset ()
[inline]
All bits set to zero.
Reimplemented from std::bitset< Nb >.
Definition at line 119 of file debug/bitset.
Referenced by __gnu_debug_def::bitset< Nb >::operator~().
template<size_t Nb> __gnu_debug_def::bitset< Nb >::bitset
(unsigned long __val) [inline]
Initial bits bitwise-copied from a single word (others set
to zero).
Reimplemented from std::bitset< Nb >.
Definition at line 121 of file debug/bitset.

Member Function Documentation

template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::operator<<= (size_t position) [inline]
Operations on bitsets.
Parameters:
position The number of places to shift.
These should be self-explanatory.
Reimplemented from std::bitset< Nb >.
Definition at line 157 of file debug/bitset.
template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::operator>>= (size_t position) [inline]
Operations on bitsets.
Parameters:
position The number of places to shift.
These should be self-explanatory.
Reimplemented from std::bitset< Nb >.
Definition at line 164 of file debug/bitset.
template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::set () [inline]
Sets every bit to true.
Reimplemented from std::bitset< Nb >.
Definition at line 171 of file debug/bitset.
template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::set (size_t position, bool __val = true) [inline]
Sets a given bit to a particular value.
Parameters:
position The index of the bit.
val Either true or false, defaults to true.
Exceptions:
std::out_of_range If pos is bigger the size of the
set.
Reimplemented from std::bitset< Nb >.
Definition at line 180 of file debug/bitset.
template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::reset () [inline]
Sets every bit to false.
Reimplemented from std::bitset< Nb >.
Definition at line 187 of file debug/bitset.
template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::reset (size_t position) [inline]
Sets a given bit to false.
Parameters:
position The index of the bit.
Exceptions:
std::out_of_range If pos is bigger the size of the
set.
Same as writing set(pos,false).
Reimplemented from std::bitset< Nb >.
Definition at line 194 of file debug/bitset.
template<size_t Nb> bitset<Nb> __gnu_debug_def::bitset< Nb
>::operator~ () const [inline]
See the no-argument flip().
Reimplemented from std::bitset< Nb >.
Definition at line 200 of file debug/bitset.
References __gnu_debug_def::bitset< Nb >::bitset().
template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::flip () [inline]
Toggles every bit to its opposite value.
Reimplemented from std::bitset< Nb >.
Definition at line 203 of file debug/bitset.
template<size_t Nb> bitset<Nb>& __gnu_debug_def::bitset< Nb
>::flip (size_t position) [inline]
Toggles a given bit to its opposite value.
Parameters:
position The index of the bit.
Exceptions:
std::out_of_range If pos is bigger the size of the
set.
Reimplemented from std::bitset< Nb >.
Definition at line 210 of file debug/bitset.
template<size_t Nb> reference __gnu_debug_def::bitset< Nb
>::operator[] (size_t position) [inline]
Array-indexing support.
Parameters:
position Index into the bitset.
Returns:
A bool for a 'const bitset'. For non-const bitsets, an
instance of the reference proxy class.
Note:
These operators do no range checking and throw no ex
ceptions, as required by DR 11 to the standard.
Reimplemented from std::bitset< Nb >.
Definition at line 220 of file debug/bitset.
References std::bitset< Nb >::reference.
template<size_t Nb> bool __gnu_debug_def::bitset< Nb
>::operator[] (size_t position) const [inline]
Array-indexing support.
Parameters:
position Index into the bitset.
Returns:
A bool for a 'const bitset'. For non-const bitsets, an
instance of the reference proxy class.
Note:
These operators do no range checking and throw no ex
ceptions, as required by DR 11 to the standard.
Reimplemented from std::bitset< Nb >.
Definition at line 229 of file debug/bitset.
template<size_t Nb> template<typename CharT, typename Traits,
typename Allocator> std::basic_string<CharT, Traits, Allocator>
__gnu_debug_def::bitset< Nb >::to_string () const [inline]
Retuns a character interpretation of the bitset.
Returns:
The string equivalent of the bits.
Note the ordering of the bits: decreasing character posi
tions correspond to increasing bit positions (see the main class
notes for an example).
Also note that you must specify the string's template pa
rameters explicitly. Given a bitset bs and a string :

s = bs.to_string<char,char_traits<char>,alloca
tor<char> >();
Reimplemented from std::bitset< Nb >.
Definition at line 239 of file debug/bitset.
template<size_t Nb> bitset<Nb> __gnu_debug_def::bitset< Nb
>::operator<< (size_t position) const [inline]
Self-explanatory.
Reimplemented from std::bitset< Nb >.
Definition at line 258 of file debug/bitset.
template<size_t Nb> bitset<Nb> __gnu_debug_def::bitset< Nb
>::operator>> (size_t position) const [inline]
Self-explanatory.
Reimplemented from std::bitset< Nb >.
Definition at line 262 of file debug/bitset.
template<size_t Nb> bitset<Nb>& std::bitset< Nb >::operator &=
(const bitset< Nb > & __rhs) [inline, inherited]
Operations on bitsets.
Parameters:
rhs A same-sized bitset.
These should be self-explanatory.
Definition at line 745 of file bitset.
template<size_t Nb> bitset<Nb>& std::bitset< Nb >::operator|=
(const bitset< Nb > & __rhs) [inline, inherited]
Operations on bitsets.
Parameters:
rhs A same-sized bitset.
These should be self-explanatory.
Definition at line 752 of file bitset.
template<size_t Nb> bitset<Nb>& std::bitset< Nb >::operator^=
(const bitset< Nb > & __rhs) [inline, inherited]
Operations on bitsets.
Parameters:
rhs A same-sized bitset.
These should be self-explanatory.
Definition at line 759 of file bitset.
template<size_t Nb> unsigned long std::bitset< Nb >::to_ulong
() const [inline, inherited]
Retuns a numerical interpretation of the bitset.
Returns:
The integral equivalent of the bits.
Exceptions:
std::overflow_error If there are too many bits to be
represented in an unsigned long.
Definition at line 955 of file bitset.
template<size_t Nb> size_t std::bitset< Nb >::count () const
[inline, inherited]
Returns the number of bits which are set.
Definition at line 992 of file bitset.
template<size_t Nb> size_t std::bitset< Nb >::size () const
[inline, inherited]
Returns the total number of bits.
Definition at line 996 of file bitset.
template<size_t Nb> bool std::bitset< Nb >::operator== (const
bitset< Nb > & __rhs) const [inline, inherited]
These comparisons for equality/inequality are, well,
bitwise.
Definition at line 1001 of file bitset.
template<size_t Nb> bool std::bitset< Nb >::operator!= (const
bitset< Nb > & __rhs) const [inline, inherited]
These comparisons for equality/inequality are, well,
bitwise.
Definition at line 1005 of file bitset.
template<size_t Nb> bool std::bitset< Nb >::test (size_t
position) const [inline, inherited]
Tests the value of a bit.
Parameters:
position The index of a bit.
Returns:
The value at pos.
Exceptions:
std::out_of_range If pos is bigger the size of the
set.
Definition at line 1016 of file bitset.
References std::__throw_out_of_range().
template<size_t Nb> bool std::bitset< Nb >::any () const
[inline, inherited]
Tests whether any of the bits are on.
Returns:
True if at least one bit is set.
Definition at line 1028 of file bitset.
template<size_t Nb> bool std::bitset< Nb >::none () const
[inline, inherited]
Tests whether any of the bits are on.
Returns:
True if none of the bits are set.
Definition at line 1035 of file bitset.
void __gnu_debug::Safe_sequence_base::M_detach_all ()
[protected, inherited]
Detach all iterators, leaving them singular.
Definition at line 114 of file debug.cc.
void __gnu_debug::Safe_sequence_base::M_detach_singular ()
[protected, inherited]
Detach all singular iterators.
Postcondition:
for all iterators i attached to this sequence,
i->M_version == M_version.
Definition at line 133 of file debug.cc.
void __gnu_debug::Safe_sequence_base::M_revalidate_singular ()
[protected, inherited]
Revalidates all attached singular iterators. This method
may be used to validate iterators that were invalidated before
(but for some reasion, such as an exception, need to become valid
again).
Definition at line 154 of file debug.cc.
void __gnu_debug::Safe_sequence_base::M_swap
(Safe_sequence_base & x) [protected, inherited]
Swap this sequence with the given sequence. This operation
also swaps ownership of the iterators, so that when the operation
is complete all iterators that originally referenced one contain
er now reference the other container.
Definition at line 172 of file debug.cc.
References __gnu_debug::swap().
void __gnu_debug::Safe_sequence_base::M_invalidate_all ()
const [inline, inherited]
Invalidates all iterators.
Definition at line 202 of file safe_base.h.

Member Data Documentation

Safe_iterator_base*
__gnu_debug::Safe_sequence_base::M_iterators [inherited]
The list of mutable iterators that reference this contain
er.
Definition at line 153 of file safe_base.h.
Safe_iterator_base*
__gnu_debug::Safe_sequence_base::M_const_iterators [inherited]
The list of constant iterators that reference this con
tainer.
Definition at line 156 of file safe_base.h.
unsigned int __gnu_debug::Safe_sequence_base::M_version
[mutable, inherited]
The container version number. This number may never be 0.
Definition at line 159 of file safe_base.h.

Author

Generated automatically by Doxygen for libstdc++-v3 Source
from the source code.
libstdc++-v3 Source 1 Jan 2007 __gnu_de
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout