![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The bitfield class.
The default constructor. Create an empty bitfield.
Murl.Bitfield new()
Empty the bitfield.
Empty()
Set a bit in the bitfield. Extends the bitfield if the bitIndex is greater than the current number of bits, new bits are set to zero.
Set(Integer bitIndex)
bitIndex | The zero based index of the bit to set. |
Clear a bit in the bitfield. Extends the bitfield if the bitIndex is greater than the current number of bits, new bits are set to zero.
Clear(Integer bitIndex)
bitIndex | The zero based index of the bit to clear. |
Check if a bit is set in the bitfield.
Boolean IsSet(Integer bitIndex)
bitIndex | The zero based index of the bit to test. |
Check if a bit is cleared in the bitfield.
Boolean IsCleared(Integer bitIndex)
bitIndex | The zero based index of the bit to test. |
Get the number of allocated bits in the bitfield.
Integer GetBitsCount()
Set the number of bits in the bitfield. The bitfield is allocated in 32-bit steps, if the bitfield is extended, the new bits are set to zero.
Integer SetBitsCount(Integer numBits)
numBits | The new number of bits in the bitfield. |
Get the byte size of the bitfield.
Integer GetByteSize()