OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BitSet Class Reference

#include <bitset.h>

Inheritance diagram for BitSet:
Collaboration diagram for BitSet:

Public Member Functions

BitSetset (size_t pos)
 
BitSetreset (size_t pos)
 
bool test (size_t pos) const
 
void clear ()
 
bool empty () const
 
bool none () const
 
bool any () const
 
size_t size () const
 
size_t count () const
 
size_t find_first () const
 
size_t find_next (size_t pos) const
 
size_t find_last () const
 
size_t find_first_clear () const
 
size_t find_next_clear (size_t pos) const
 
bool intersects (const BitSet &rhs) const
 
bool operator== (const BitSet &rhs) const
 
bool operator!= (const BitSet &rhs) const
 
BitSet operator& (const BitSet &rhs) const
 
BitSet operator| (const BitSet &rhs) const
 
BitSetoperator&= (const BitSet &rhs)
 
BitSetoperator|= (const BitSet &rhs)
 
void Set (const BitSet &rhs)
 
void Reset (const BitSet &rhs)
 
void BuildComplement (const BitSet &lhs, const BitSet &rhs)
 
void BuildIntersection (const BitSet &lhs, const BitSet &rhs)
 
bool Contains (const BitSet &rhs) const
 
std::string ToString () const
 
void FromString (std::string str)
 
std::string ToNumberedString () const
 

Static Public Attributes

static const size_t npos = static_cast<size_t>(-1)
 

Private Member Functions

void compact ()
 
void check_invariants ()
 

Private Attributes

std::vector< uint64_t > blocks_
 

Friends

class BitSetTest
 

Detailed Description

Definition at line 17 of file bitset.h.

Member Function Documentation

bool BitSet::any ( ) const

Definition at line 179 of file bitset.cc.

void BitSet::BuildComplement ( const BitSet lhs,
const BitSet rhs 
)

Definition at line 486 of file bitset.cc.

void BitSet::BuildIntersection ( const BitSet lhs,
const BitSet rhs 
)

Definition at line 509 of file bitset.cc.

void BitSet::check_invariants ( )
private

Definition at line 232 of file bitset.cc.

void BitSet::clear ( )

Definition at line 158 of file bitset.cc.

void BitSet::compact ( )
private

Definition at line 209 of file bitset.cc.

bool BitSet::Contains ( const BitSet rhs) const

Definition at line 536 of file bitset.cc.

size_t BitSet::count ( ) const

Definition at line 194 of file bitset.cc.

Here is the call graph for this function:

bool BitSet::empty ( ) const

Definition at line 165 of file bitset.cc.

size_t BitSet::find_first ( ) const

Definition at line 242 of file bitset.cc.

Here is the call graph for this function:

size_t BitSet::find_first_clear ( ) const

Definition at line 307 of file bitset.cc.

Here is the call graph for this function:

size_t BitSet::find_last ( ) const

Definition at line 288 of file bitset.cc.

Here is the call graph for this function:

size_t BitSet::find_next ( size_t  pos) const

Definition at line 255 of file bitset.cc.

Here is the call graph for this function:

size_t BitSet::find_next_clear ( size_t  pos) const

Definition at line 324 of file bitset.cc.

Here is the call graph for this function:

void BitSet::FromString ( std::string  str)

Definition at line 572 of file bitset.cc.

bool BitSet::intersects ( const BitSet rhs) const

Definition at line 354 of file bitset.cc.

bool BitSet::none ( ) const

Definition at line 172 of file bitset.cc.

bool BitSet::operator!= ( const BitSet rhs) const

Definition at line 382 of file bitset.cc.

Here is the call graph for this function:

BitSet BitSet::operator& ( const BitSet rhs) const

Definition at line 389 of file bitset.cc.

Here is the call graph for this function:

BitSet & BitSet::operator&= ( const BitSet rhs)

Definition at line 430 of file bitset.cc.

bool BitSet::operator== ( const BitSet rhs) const

Definition at line 369 of file bitset.cc.

BitSet BitSet::operator| ( const BitSet rhs) const

Definition at line 399 of file bitset.cc.

Here is the call graph for this function:

BitSet & BitSet::operator|= ( const BitSet rhs)

Definition at line 449 of file bitset.cc.

BitSet & BitSet::reset ( size_t  pos)

Definition at line 136 of file bitset.cc.

Here is the call graph for this function:

void BitSet::Reset ( const BitSet rhs)

Definition at line 470 of file bitset.cc.

BitSet & BitSet::set ( size_t  pos)

Definition at line 125 of file bitset.cc.

Here is the call graph for this function:

void BitSet::Set ( const BitSet rhs)

Definition at line 462 of file bitset.cc.

size_t BitSet::size ( ) const

Definition at line 187 of file bitset.cc.

bool BitSet::test ( size_t  pos) const

Definition at line 146 of file bitset.cc.

Here is the call graph for this function:

string BitSet::ToNumberedString ( ) const

Definition at line 593 of file bitset.cc.

Here is the call graph for this function:

string BitSet::ToString ( ) const

Definition at line 551 of file bitset.cc.

Friends And Related Function Documentation

friend class BitSetTest
friend

Definition at line 54 of file bitset.h.

Member Data Documentation

std::vector<uint64_t> BitSet::blocks_
private

Definition at line 59 of file bitset.h.

const size_t BitSet::npos = static_cast<size_t>(-1)
static

Definition at line 19 of file bitset.h.


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