#include <BitSet.h>
Public Member Functions | |
| BitSet () | |
| BitSet (unsigned int size) | |
| ~BitSet () | |
| void | setSize (unsigned int size) |
| uint32 | getBits (unsigned int pos, unsigned int n) |
| void | setBits (unsigned int pos, unsigned int n, uint32 bits) |
| void | save (ODataSource *ods) |
| bool | load (IDataSource *ids, uint32 version) |
Private Attributes | |
| unsigned int | size |
| unsigned int | bytes |
| uint8 * | data |
Definition at line 25 of file BitSet.h.
| BitSet::BitSet | ( | ) |
Definition at line 25 of file BitSet.cpp.
| BitSet::BitSet | ( | unsigned int | size | ) |
| BitSet::~BitSet | ( | ) |
| uint32 BitSet::getBits | ( | unsigned int | pos, | |
| unsigned int | n | |||
| ) |
get a value
| pos | zero-based position (in bits) | |
| n | number of bits (no greater than 32) |
Definition at line 56 of file BitSet.cpp.
Referenced by UCMachine::ConCmd_getGlobal(), UCMachine::ConCmd_setGlobal(), and UCMachine::execProcess().
| bool BitSet::load | ( | IDataSource * | ids, | |
| uint32 | version | |||
| ) |
Definition at line 126 of file BitSet.cpp.
References bytes, data, IDataSource::read(), IDataSource::read4(), and setSize().
Referenced by UCMachine::loadGlobals().
| void BitSet::save | ( | ODataSource * | ods | ) |
Definition at line 120 of file BitSet.cpp.
References bytes, data, size, ODataSource::write(), and ODataSource::write4().
Referenced by UCMachine::saveGlobals().
| void BitSet::setBits | ( | unsigned int | pos, | |
| unsigned int | n, | |||
| uint32 | bits | |||
| ) |
set a value
| pos | zero-based position (in bits) | |
| n | number of bits (no greater than 32) | |
| bits | the value to set |
Definition at line 88 of file BitSet.cpp.
Referenced by UCMachine::ConCmd_setGlobal(), and UCMachine::execProcess().
| void BitSet::setSize | ( | unsigned int | size | ) |
set the size. The old value is cleared
| size | the new size (in bits) |
Definition at line 42 of file BitSet.cpp.
References bytes, data, and size.
Referenced by BitSet(), load(), and UCMachine::reset().
unsigned int BitSet::bytes [private] |
uint8* BitSet::data [private] |
unsigned int BitSet::size [private] |
1.4.7