| Derived from | |
| Framework | CoreFoundation/CoreFoundation.h |
| Companion guide | |
| Declared in | CFBitVector.h |
CFMutableBitVector objects manage dynamic bit vectors. The basic interface for managing bit vectors is provided by CFBitVector. CFMutableBitVector adds functions to modify the contents of a bit vector.
You create a mutable bit vector object using either the CFBitVectorCreateMutable or CFBitVectorCreateMutableCopy function. You add to and remove from a bit vector by altering the size of the bit vector with the CFBitVectorSetCount function
CFBitVectorFlipBitAtIndex
CFBitVectorFlipBits
CFBitVectorSetAllBits
CFBitVectorSetBitAtIndex
CFBitVectorSetBits
CFBitVectorSetCount
Creates a mutable bit vector.
CFMutableBitVectorRef CFBitVectorCreateMutable ( CFAllocatorRef allocator, CFIndex capacity );
The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The maximum number of values that can be contained by the new bit vector. The bit vector starts empty and can grow to this number of values. If 0, the new bit vector can grow to any size.
A new bit vector. Ownership follows the Create Rule.
CFBitVector.h
Creates a new mutable bit vector from a pre-existing bit vector.
CFMutableBitVectorRef CFBitVectorCreateMutableCopy ( CFAllocatorRef allocator, CFIndex capacity, CFBitVectorRef bv );
The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The maximum number of values that can be contained by the new bit vector. The bit vector starts with the same number of values as bv and can grow to this number of values. If 0, the new bit vector can grow to any size. If non-zero, capacity must be large enough to hold all bit values from bv.
The bit vector to copy.
A new bit vector holding the same bit values as bv. Ownership follows the Create Rule
CFBitVector.h
Flips a bit value in a bit vector.
void CFBitVectorFlipBitAtIndex ( CFMutableBitVectorRef bv, CFIndex idx );
The bit vector to modify.
The index of the bit value to flip.
CFBitVector.h
Flips a range of bit values in a bit vector.
void CFBitVectorFlipBits ( CFMutableBitVectorRef bv, CFRange range );
The bit vector to modify.
The range of bit values in bv to flip.
CFBitVector.h
Sets all bits in a bit vector to a particular value.
void CFBitVectorSetAllBits ( CFMutableBitVectorRef bv, CFBit value );
The bit vector to modify.
The bit value to which to set all bits in bv.
CFBitVector.h
Sets the value of a particular bit in a bit vector.
void CFBitVectorSetBitAtIndex ( CFMutableBitVectorRef bv, CFIndex idx, CFBit value );
The bit vector to modify.
The index of the bit value to set.
The bit value to which to set the bit at index idx.
CFBitVector.h
Sets a range of bits in a bit vector to a particular value.
void CFBitVectorSetBits ( CFMutableBitVectorRef bv, CFRange range, CFBit value );
The bit vector to modify.
The range of bits to set.
The bit value to which to set the range of bits.
CFBitVector.h
Changes the size of a mutable bit vector.
void CFBitVectorSetCount ( CFMutableBitVectorRef bv, CFIndex count );
The bit vector to modify.
The new size for bv. If count is greater than the current size of bv, the additional bit values are set to 0.
If bv was created with a fixed capacity, you cannot increase its size beyond that capacity.
CFBitVector.hA reference to a mutable bit vector object.
typedef struct __CFBitVector *CFMutableBitVectorRef;
CFBitVector.h
Last updated: 2006-02-07