CommonC++Lib RiscOSC++Lib ToolboxC++Lib
Toolbox Library for use with the RiscOS DDE C++/CFront compiler
|
#include <BitField.h>
Public Member Functions | |
BitField (void) | |
~BitField (void) | |
BitField (int bits) | |
void | setBit (int bit) |
void | clearBit (int bit) |
int | isSet (int bit) |
int | isClear (int bit) |
void | invert (void) |
void | clear (void) |
void | set (void) |
unsigned int | numBits (void) |
void | showProperties () |
char * | getClassName () |
int | getClassType () |
Public Member Functions inherited from Object | |
Object () | |
~Object () |
Bitfield
CommonC++Lib
Class to create objects containing a single or multiple bytes which can be manipulated or tested at the bit level. Passing an integer value to the constructor will create an object with enough bytes to store the number of bits required as passed to the constructor.
BitField::BitField | ( | void | ) |
BitField constructor Creates an object with 8 available bits
BitField::~BitField | ( | void | ) |
BitField::BitField | ( | int | bits | ) |
BitField constructor
[in] | bits | Number of bits to store in the object |
void BitField::clear | ( | void | ) |
Clears all the bits in a BitField object
void BitField::clearBit | ( | int | bit | ) |
Clears an individual bit in a BitField object
[in] | bit | Offset to the bit to clear |
|
inlinevirtual |
Returns the classname of the object Returns a pointer to a zero terminated character field containing "BitField"
Implements Object.
|
inlinevirtual |
void BitField::invert | ( | void | ) |
Inverts all the bits in a BitField object
int BitField::isClear | ( | int | bit | ) |
Tests an individual bit in a BitField object
[in] | bit | Offset to the bit to test Returns an integer representing True or False True - the bit is clear False - the bit is set |
int BitField::isSet | ( | int | bit | ) |
Tests an individual bit in a BitField object
[in] | bit | Offset to the bit to test Returns an integer representing True or False True - the bit is set False - the bit is clear |
unsigned int BitField::numBits | ( | void | ) |
Returns the number bits in a BitField object
void BitField::set | ( | void | ) |
Sets all the bits in a BitField object
void BitField::setBit | ( | int | bit | ) |
Sets an individual bit in a BitField object
[in] | bit | Offset to the bit to set |
|
inlinevirtual |
Currently unused
Implements Object.