| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Sunday, July 29, 2001, at 01:20 PM, Brian Cave wrote:
I want to have a unique CFTypeID that my class exports that would be unique in the same manner as these already are in the CoreFoundation world, no better. And I want my class to be retainable / releaseable using the CoreFoundation retain / release APIs. I do not desire any more compatability than this.
I looked into this a while back, and even downloaded the portion of the CF source in Darwin so I could see how it's done. Right now, it can't, per se.
There are several limitations to the CF itself (a fairly restrictive limit on the global number of CF types allowed in a single process -- 255 -- for example), and the internal API that you'd need to use (which you could dig out of Darwin) is very likely to change. In fact, I'd almost put money on it having changed in 10.1.
However, someone on this list (I forget who, sorry) had the excellent suggestion of wrapping my class around a CFData. Create some accessors to store the class' private instance data (ie., a struct) in the CFData.
What I ended up doing in the end was to just create a separate set of CF functions for my own class' use that paralleled the standard CF ones (ie., CFXRetain instead of CFRetain). I also created my own set of collection-handling functions for CFDictionaries and CFArrays that did the right thing with both my own CF-like types and standard CF types.
Brian
| References: | |
| >Re: Can one extend CoreFoundation using Obj-C? (From: Brian Hill <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.