| Derived from | |
| Framework | CoreFoundation/CoreFoundation.h |
| Companion guide | |
| Declared in | CFBitVector.h |
CFBitVector and its derived mutable type, CFMutableBitVector, manage ordered collections of bit values, which are either 0 or 1. CFBitVector creates static bit vectors and CFMutableBitVector creates dynamic bit vectors.
CFBitVectorContainsBit
CFBitVectorGetBitAtIndex
CFBitVectorGetBits
CFBitVectorGetCount
CFBitVectorGetCountOfBit
CFBitVectorGetFirstIndexOfBit
CFBitVectorGetLastIndexOfBit
Returns whether a bit vector contains a particular bit value.
Boolean CFBitVectorContainsBit ( CFBitVectorRef bv, CFRange range, CFBit value );
The bit vector to search.
The range of bits in bv to search.
The bit value for which to search.
true if the specified range of bits in bv contains value, otherwise false.
CFBitVector.h
Creates an immutable bit vector from a block of memory.
CFBitVectorRef CFBitVectorCreate ( CFAllocatorRef allocator, const UInt8 *bytes, CFIndex numBits );
The allocator to use to allocate memory for the new bit vector. Pass NULL or kCFAllocatorDefault to use the current default allocator.
A pointer to the bit values to store in the new bit vector. The values are copied into the bit vector’s own memory. The bit indices are numbered left-to-right with 0 being the left-most, or most-significant, bit in the byte stream.
The number of bits in the bit vector.
A new bit vector. Ownership follows the Create Rule.
CFBitVector.h
Creates an immutable bit vector that is a copy of another bit vector.
CFBitVectorRef CFBitVectorCreateCopy ( CFAllocatorRef allocator, CFBitVectorRef bv );
The allocator to use to allocate memory for the new bit vector. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The bit vector to copy.
A new bit vector holding the same bit values as bv. Ownership follows the Create Rule.
CFBitVector.h
Returns the bit value at a given index in a bit vector.
CFBit CFBitVectorGetBitAtIndex ( CFBitVectorRef bv, CFIndex idx );
The bit vector to examine.
The index of the bit value in bv to return.
The bit value at index idx in bv.
CFBitVector.h
Returns the bit values in a range of indices in a bit vector.
void CFBitVectorGetBits ( CFBitVectorRef bv, CFRange range, UInt8 *bytes );
The bit vector to examine.
The range of bit values to return.
On return, contains the requested bit values from bv. This argument must point to enough memory to hold the number of bits requested. The requested bits are left-aligned with the first requested bit stored in the left-most, or most-significant, bit of the byte stream.
CFBitVector.h
Returns the number of bit values in a bit vector.
CFIndex CFBitVectorGetCount ( CFBitVectorRef bv );
The bit vector to examine.
The current size of bv.
CFBitVector.h
Counts the number of times a certain bit value occurs within a range of bits in a bit vector.
CFIndex CFBitVectorGetCountOfBit ( CFBitVectorRef bv, CFRange range, CFBit value );
The bit vector to examine.
The range of bits in bv to search.
The bit value to count.
The number of occurrences of value in the specified range of bv.
CFBitVector.h
Locates the first occurrence of a certain bit value within a range of bits in a bit vector.
CFIndex CFBitVectorGetFirstIndexOfBit ( CFBitVectorRef bv, CFRange range, CFBit value );
The bit vector to examine.
The range of bits in bv to search.
The bit value for which to search.
The index of the first occurrence of value in the specified range of bv, or kCFNotFound if value is not present.
CFBitVector.h
Locates the last occurrence of a certain bit value within a range of bits in a bit vector.
CFIndex CFBitVectorGetLastIndexOfBit ( CFBitVectorRef bv, CFRange range, CFBit value );
The bit vector to examine.
The range of bits in bv to search.
The bit value for which to search.
The index of the last occurrence of value in the specified range of bv, or kCFNotFound if value is not present.
CFBitVector.h
Returns the type identifier for the CFBitVector opaque type.
CFTypeID CFBitVectorGetTypeID ( void );
The type identifier for the CFBitVector opaque type.
CFMutableBitVector objects have the same type identifier as CFBitVector objects.
CFBitVector.hA binary value of either 0 or 1.
typedef UInt32 CFBit;
CFBitVector.hA reference to an immutable bit vector object.
typedef const struct __CFBitVector *CFBitVectorRef;
CFBitVector.h
Last updated: 2005-12-06