[libgfc Index] [libgfc Hierarchy] [Headers]
GBitArray provides an array of bits More...
#include <utils/src/gbitarray.h>
GBitArray provides an array of bits. The main methods are bit setting/clearing/testing. operator[] is only defined for read-only access, for simplicity.
[public]
reset the size to new_size bits. If new_size is smaller than the current one, the memory is usually not shrinked. Only the size information is updated.
[public]
fill the first 'size' bits with value 'v'. If size<0 fill every bits in the array. If size > current size then only the current_size bits will be filled; the array will not be automatically resized to accomodate the bigger size.
[public]
test wether bit at idx is true. Return true if bit is true; otherwise return false.
[public]
set bit at idx to 1.
[public]
clear bit at idx to 0.
[public]
toggle the bit. return the NEW bit value.
[public]
toggle every bit in the array.
Documentation generated by lqian@lqian-sun on Wed Jul 14 09:36:10 EDT 1999 | Kdoc |