Mac Developer Library

Developer

Core Foundation Framework Reference CFMutableBitVector Reference

Options
Deployment Target:

On This Page
Language:

CFMutableBitVector Reference

CFMutableBitVector objects manage dynamic bit vectors. The basic interface for managing bit vectors is provided by CFBitVector Reference. 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

Functions

  • Creates a mutable bit vector.

    Declaration

    Swift

    func CFBitVectorCreateMutable(_ allocator: CFAllocator!, _ capacity: CFIndex) -> CFMutableBitVector!

    Objective-C

    CFMutableBitVectorRef CFBitVectorCreateMutable ( CFAllocatorRef allocator, CFIndex capacity );

    Parameters

    allocator

    The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

    capacity

    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 (and it can have less).

    Pass 0 to specify that the maximum capacity is not limited. The value must not be negative.

    Return Value

    A new bit vector. Ownership follows the Create Rule.

    Availability

    Available in OS X v10.0 and later.

  • Creates a new mutable bit vector from a pre-existing bit vector.

    Declaration

    Swift

    func CFBitVectorCreateMutableCopy(_ allocator: CFAllocator!, _ capacity: CFIndex, _ bv: CFBitVector!) -> CFMutableBitVector!

    Objective-C

    CFMutableBitVectorRef CFBitVectorCreateMutableCopy ( CFAllocatorRef allocator, CFIndex capacity, CFBitVectorRef bv );

    Parameters

    allocator

    The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

    capacity

    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 (it can have less).

    Pass 0 to specify that the maximum capacity is not limited. If non-0, capacity must be large enough to hold all bit values from bv.

    bv

    The bit vector to copy.

    Return Value

    A new bit vector holding the same bit values as bv. Ownership follows the Create Rule

    Availability

    Available in OS X v10.0 and later.

Data Types

Miscellaneous

  • A reference to a mutable bit vector object.

    Declaration

    Swift

    typealias CFMutableBitVectorRef = CFMutableBitVector

    Objective-C

    typedef struct __CFBitVector *CFMutableBitVectorRef;

    Import Statement

    Objective-C

    @import CoreFoundation;

    Swift

    import CoreFoundation

    Availability

    Available in OS X v10.0 and later.