Nugget
Classes | Public Types | Public Member Functions | Public Attributes | Friends | List of all members
eastl::bitset< N, WordType > Class Template Reference

#include <bitset.h>

Inheritance diagram for eastl::bitset< N, WordType >:
Inheritance graph
[legend]
Collaboration diagram for eastl::bitset< N, WordType >:
Collaboration graph
[legend]

Classes

class  reference
 

Public Types

enum  {
  kBitsPerWord = (8 * sizeof(word_type)) , kBitsPerWordMask = (kBitsPerWord - 1) , kBitsPerWordShift = ((kBitsPerWord == 8) ? 3 : ((kBitsPerWord == 16) ? 4 : ((kBitsPerWord == 32) ? 5 : (((kBitsPerWord == 64) ? 6 : 7))))) , kSize = N ,
  kWordSize = sizeof(word_type) , kWordCount = BITSET_WORD_COUNT(N, WordType)
}
 
typedef BitsetBase< BITSET_WORD_COUNT(N, WordType), WordType > base_type
 
typedef bitset< N, WordType > this_type
 
typedef WordType word_type
 
typedef base_type::size_type size_type
 

Public Member Functions

 bitset (uint32_t value)
 
this_typeoperator&= (const this_type &x)
 
this_typeoperator|= (const this_type &x)
 
this_typeoperator^= (const this_type &x)
 
this_typeoperator<<= (size_type n)
 
this_typeoperator>>= (size_type n)
 
this_typeset ()
 
this_typeset (size_type i, bool value=true)
 
this_typereset ()
 
this_typereset (size_type i)
 
this_typeflip ()
 
this_typeflip (size_type i)
 
this_type operator~ () const
 
reference operator[] (size_type i)
 
bool operator[] (size_type i) const
 
const word_type * data () const
 
word_type * data ()
 
void from_uint32 (uint32_t value)
 
void from_uint64 (uint64_t value)
 
size_type size () const
 
bool operator== (const this_type &x) const
 
bool operator!= (const this_type &x) const
 
bool test (size_type i) const
 
bool all () const
 
bool none () const
 
this_type operator<< (size_type n) const
 
this_type operator>> (size_type n) const
 
size_type find_first () const
 
size_type find_next (size_type last_find) const
 
size_type find_last () const
 
size_type find_prev (size_type last_find) const
 
word_type & DoGetWord (size_type i)
 
word_type DoGetWord (size_type i) const
 
size_type DoFindFirst () const
 
size_type DoFindNext (size_type last_find) const
 
size_type DoFindLast () const
 
size_type DoFindPrev (size_type last_find) const
 
unsigned long to_ulong () const
 
uint32_t to_uint32 () const
 
uint64_t to_uint64 () const
 
size_type count () const
 
bool any () const
 

Public Attributes

word_type mWord [NW]
 

Friends

class reference
 

Detailed Description

template<size_t N, typename WordType = EASTL_BITSET_WORD_TYPE_DEFAULT>
class eastl::bitset< N, WordType >

bitset

Implements a bitset much like the C++ std::bitset.

As of this writing we don't implement a specialization of bitset<0>, as it is deemed an academic exercise that nobody would actually use and it would increase code space and provide little practical benefit. Note that this doesn't mean bitset<0> isn't supported; it means that our version of it isn't as efficient as it would be if a specialization was made for it.


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