- Inherits from:
- Object
- Declared in:
- DBitArray.h
Object
|
+---DBitArray
Class Description
The bit array data type implements a number of methods for creating,
manipulating and checking bit sets.
- Last modified:
- 12-Nov-2005 (DBitArray.h)
Instance Variables
- private unsigned char *_array
- the bits for the array
- private int _min
- the minimum value in the bit array
- private int _max
- the maximum value in the bit array
- private int _size
- the size of the bit array
- Constructors
- - (DBitArray *) init
- Initialise to an empty bit array with range 0..255
- Returns:
- the object
- - (DBitArray *) init :(int) min :(int) max
- Initialise to an empty bit array
- Parameters:
- min - the minimum value in the bit array
max - the maximum value in the bit array
- Returns:
- the object
- Copy related methods
- - deepen
- Deepen a copy of the bit array object
- Returns:
- the object
- Destructor
- - free
- Free the bit array
- Returns:
- the object
- Member methods
- - (int) max
- Return the maximum value in the bit array
- Returns:
- the maximum value
- - (int) min
- Return the minimum value in the bit array
- Returns:
- the minumum value
- Main methods
- - (DBitArray *) reset
- Reset the whole bit array
- Returns:
- the object
- - (DBitArray *) reset :(int) val
- Reset one value in the bit array
- Parameters:
- val - the value to reset
- Returns:
- the object
- - (DBitArray *) reset :(int) from :(int) to
- Reset a range of values in the bit array
- Parameters:
- from - the start of the bit set (incl.)
to - the end of the bit set (incl.)
- Returns:
- the object
- - (DBitArray *) reset :(int) from :(int) to :(unsigned) step
- Reset a range of values, stepwise in the bit array
- Parameters:
- from - the start of the bit set (incl.)
to - the end of the bit set (incl.)
step - the step for the bit set (> 0)
- Returns:
- the object
- - (DBitArray *) set :(int) val
- Set one value in the bit array
- Parameters:
- val - the value to set
- Returns:
- the object
- - (DBitArray *) set :(int) from :(int) to
- Set a range of values in the bit array
- Parameters:
- from - the start of the bit array (incl.)
to - the end of the bit array (incl.)
- Returns:
- the object
- - (DBitArray *) set :(int) from :(int) to :(unsigned) step
- Set a range of values, stepwise in the bit array
- Parameters:
- from - the start of the bit set (incl.)
to - the end of the bit set (incl.)
step - the step for the bit set (> 0)
- Returns:
- the object
- Checking methods
- - (int) count
- Count the number of values set
- Returns:
- the number of values set
- - (BOOL) has :(int) val
- Check if a value is set in the bit array
- Parameters:
- val - the value to be checked
- Returns:
- is the value set in the bit array ?
generated 08-Jan-2006 by ObjcDoc 3.0.0