Re: CFStringRef == NSString* ?
Re: CFStringRef == NSString* ?
- Subject: Re: CFStringRef == NSString* ?
- From: Fritz Anderson <email@hidden>
- Date: Wed, 21 Apr 2004 16:07:20 -0500
The short answer is yes. You can cast, e.g., an NSString * to a
CFStringRef and vice versa, and it works. Search the online documents
for "toll-free bridged" for a list of all data types for which this the
case. (CFArray, CFCharacterSet, CFData, CFDate, CFDictionary,
CFRunLoopTimer, CFSet, CFString, CFURL, and CFTimeZone, according to
the list I'm looking at now.)
-- F
On 21 Apr 2004, at 3:22 PM, Mark Alldritt wrote:
I have a bunch of C++ code that interacts with CodeFoundation
(CFString,
etc.). I would like to reused this code in a Cocoa project. The
question
is this: are the CoreFoundation types (CFStringRef, CFArrayRef, etc.)
equal
to corresponding FoundationKit types (NSString*, NSArray*, etc.)?
If this is true, then I can safely cast my CFStringRef to a NSString*
and
pass it along to the Objective-C/Cocoa portions of my application.
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.