Dillo v3.1.1-14-g8f67d6e0
Loading...
Searching...
No Matches
lout::misc::BitSet Class Reference

A bit set, which automatically reallocates when needed. More...

#include <misc.hh>

Public Member Functions

 BitSet (int initBits)
 
 ~BitSet ()
 
void intoStringBuffer (misc::StringBuffer *sb)
 
bool get (int i) const
 
void set (int i, bool val)
 
void clear ()
 

Private Member Functions

int bytesForBits (int bits)
 

Private Attributes

unsigned char * bits
 
int numBits
 
int numBytes
 

Detailed Description

A bit set, which automatically reallocates when needed.

Definition at line 604 of file misc.hh.

Constructor & Destructor Documentation

◆ BitSet()

lout::misc::BitSet::BitSet ( int  initBits)

Definition at line 134 of file misc.cc.

References bits, bytesForBits(), clear(), numBits, and numBytes.

◆ ~BitSet()

lout::misc::BitSet::~BitSet ( )

Definition at line 142 of file misc.cc.

References bits.

Member Function Documentation

◆ bytesForBits()

int lout::misc::BitSet::bytesForBits ( int  bits)
inlineprivate

Definition at line 610 of file misc.hh.

References bits.

Referenced by BitSet().

◆ clear()

void lout::misc::BitSet::clear ( )

Definition at line 187 of file misc.cc.

References bits, and numBytes.

Referenced by BitSet(), and dw::fltk::FltkImgbuf::newScan().

◆ get()

bool lout::misc::BitSet::get ( int  i) const

◆ intoStringBuffer()

◆ set()

void lout::misc::BitSet::set ( int  i,
bool  val 
)

Member Data Documentation

◆ bits

unsigned char* lout::misc::BitSet::bits
private

Definition at line 607 of file misc.hh.

Referenced by BitSet(), bytesForBits(), clear(), get(), set(), and ~BitSet().

◆ numBits

int lout::misc::BitSet::numBits
private

Definition at line 608 of file misc.hh.

Referenced by BitSet(), intoStringBuffer(), and set().

◆ numBytes

int lout::misc::BitSet::numBytes
private

Definition at line 608 of file misc.hh.

Referenced by BitSet(), clear(), get(), and set().


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