KMIME Library
KMime::BoolFlags Class Reference
Provides a class for storing boolean values in single bytes. More...
#include <boolflags.h>
Public Member Functions | |
BoolFlags () | |
void | clear () |
unsigned char * | data () |
bool | get (unsigned int i) |
void | set (unsigned int i, bool b=true) |
~BoolFlags () |
Detailed Description
Provides a class for storing boolean values in single bytes.This class provides functionality similar to QBitArray but requires much less memory. Only 16-bits (or 2-bytes) can be stored.
Definition at line 45 of file boolflags.h.
Constructor & Destructor Documentation
KMime::BoolFlags::BoolFlags | ( | ) | [inline] |
KMime::BoolFlags::~BoolFlags | ( | ) | [inline] |
Member Function Documentation
void KMime::BoolFlags::clear | ( | ) | [inline] |
unsigned char* KMime::BoolFlags::data | ( | ) | [inline] |
Returns a pointer to the data structure used to store the bits.
Definition at line 85 of file boolflags.h.
bool BoolFlags::get | ( | unsigned int | i | ) |
Get bit number i
.
- Parameters:
-
i is the bit number. Valid values are 0 through 15. Higher values all return false
.
- Returns:
- Value of the single bit
i
. Invalid bit numbers returnfalse
.
Definition at line 59 of file boolflags.cpp.
void BoolFlags::set | ( | unsigned int | i, | |
bool | b = true | |||
) |
Sets bit number i
to the value b
.
- Parameters:
-
i is the bit number. Valid values are 0 through 15. Higher values will be silently ignored. b is the value to set for bit i
.
Definition at line 35 of file boolflags.cpp.
The documentation for this class was generated from the following files: