• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can one extend CoreFoundation using Obj-C?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can one extend CoreFoundation using Obj-C?


  • Subject: Can one extend CoreFoundation using Obj-C?
  • From: Brian Cave <email@hidden>
  • Date: Sun, 29 Jul 2001 13:20:16 -0500

I would like to add a few new CoreFoundation data types for some common code. I explicitly want to have CFRetain() / CFRelease() / CFGetTypeID() calls work. The Docs on "Toll-Free Bridging" hint that I might be able to do this (they say that CoreFoundation objects can be swapped with Cocoa NS counterparts or vise versa), but I would like to be sure that this is true and should remain true in the future.

I would then export C APIs that would wrap around the Obj-C functions that did the actual work, thus following the basic precepts of CF. This would include my own CFGetMyTypeID() functions as appropriate. This would be along side the true Obj-C APIs for Cocoa projects to access directly, just skipping the Obj-C interface code when not available in the build environment.

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 can create my own equivalent APIs using C++, but it would be much cleaner for my design to be able to work by extending CF instead.

Can anyone in the know comment if this is possible?

TIA,
brian

_____________________________________________________
Brian Cave <mailto:email@hidden>


  • Follow-Ups:
    • Re: Can one extend CoreFoundation using Obj-C?
      • From: Brian Cave <email@hidden>
    • Re: Can one extend CoreFoundation using Obj-C?
      • From: Brian Hill <email@hidden>
  • Prev by Date: Re: Installing/distributing frameworks
  • Next by Date: Re: Can one extend CoreFoundation using Obj-C?
  • Previous by thread: Displaying new attribute types in NSTextView
  • Next by thread: Re: Can one extend CoreFoundation using Obj-C?
  • Index(es):
    • Date
    • Thread