Operating-System Independence

Some Core Foundation services provide types and functions that are abstractions of things that have specific implementations on different operating systems. Code that makes use of these services is thus easier to port to different platforms.

Date and Number Services abstracts time utilities and offers facilities for converting between absolute and Gregorian measures of time. It also abstracts numeric values and provides facilities for converting between different internal representations of those values.

Several other services that abstract operating-system utilities are currently public on Mac OS X and in Cocoa for Windows but not on Mac OS 8 or Mac OS 9. Among these are inter-process notification and run-loop services.

Table 1 summarizes Core Foundation services.

Table 1   Summary of Core Foundation services
Services Header Files Description
Base CFBase.h Defines base types, "polymorphic" functions, allocator types, and functions.
String CFString.h
CFCharacterSet.h
CFStringEncodingExt.h
Provides a string type and a unified way to deal with Unicode strings. Includes functions for converting between CFStrings and various 8-bit encodings.
Collection CFArray.h
CFDictionary.h
CFSet.h
CFBag.h
CFTree.h
CFData.h
Defines various vector-based and hash-based collection types. Also includes types for hierarchical tree structures and for holding arbitrary data.
Bundle CFBundle.h Provides a type for locating and loading localized program resources and for loading code dynamically.
Property List CFPropertyList.h Provides utilities for writing and reading some collection types (plus CFStrings) as XML property lists--generalized key-value pairs for such purposes as configuration information.
Plug-in CFPlugin.h Supports the creation of plug-ins for various platforms.
URL CFURL.h
CFURLAccess.h
Provides types and functions for locating, reading, and writing files and other resources, both local and remote.
Preference CFPreference.h Allows preferences per application, user, and host to be set and retrieved.
Date and Number CFDate.h
CFTimeZone.h
CFNumber.h
Abstracts dates, times, and numbers and provides conversion and comparison facilities for their representation on various platforms.

© 1999 Apple Computer, Inc. – (Last Updated 07 September 99)