CFMutableBag

Overview

CFMutableBag manages dynamic bags. The basic interface for managing bags is provided by CFBag. CFMutableBag adds functions to modify the contents of a bag.

You create a mutable bag object using either the CFBagCreateMutable or CFBagCreateMutableCopy function.

CFMutableBag provides several functions for adding and removing values from a bag. The CFBagAddValue function adds a value to a bag and CFBagRemoveValue removes values from a bag.

Topics

Creating a Mutable Bag

CFBagCreateMutable

Creates a new empty mutable bag.

CFBagCreateMutableCopy

Creates a new mutable bag with the values from another bag.

Modifying a Mutable Bag

CFBagAddValue

Adds a value to a mutable bag.

CFBagRemoveAllValues

Removes all values from a mutable bag.

CFBagRemoveValue

Removes a value from a mutable bag.

CFBagReplaceValue

Replaces a value in a mutable bag.

CFBagSetValue

Sets a value in a mutable bag.

Data Types

CFMutableBagRef

A reference to a mutable bag object.

See Also

Opaque Types

CFFileDescriptor

The CFFileDescriptor provides an opaque type to monitor file descriptors for read and write activity via CFRunLoop.

CFStringTokenizer

CFStringTokenizer allows you to tokenize strings into words, sentences or paragraphs in a language-neutral way. It supports languages such as Japanese and Chinese that do not delimit words by spaces, as well as de-compounding German compounds. You can obtain Latin transcription for tokens. It also provides language identification API.