Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > ObjC and C++ smart pointers

ObjC and C++ smart pointers
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Santa Monica, CA
Status: Offline
Reply With Quote
Jan 6, 2001, 06:16 PM
 
The dev documentation has a little note regarding how to call C++ objects as if they were ObjC objects, thru the use of C++ smart pointers.
No real example is given, though, and I can't quite figure out how this might work.

Does anyone have experience with this or could point to a place/doc with more info on this? Thanks.

Also, what's the story about the removal of ObjC++? Has the Objective-C portion not been updated as C++ support got stronger in gcc, or what's the issue?
Smart pointers aside, are there any known work-arounds to make ObjC and C++ talk to each other?
     
Junior Member
Join Date: Apr 2000
Status: Offline
Reply With Quote
Jan 7, 2001, 11:40 AM
 
I think Apple is trying to discourage people from instantiating C++ objects from Obj-C. I think it's to reduce the gcc C++/ObjC dependency.
Anyway, the way to do is to have C wrappers. Check omnigroup list archives for the definitive answer.
     
oliver  (op)
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Santa Monica, CA
Status: Offline
Reply With Quote
Jan 7, 2001, 09:33 PM
 
Thanks for the tip. Tried searching all of OmniGroup's Developer Resources but got no matches for "C++" or "smart pointers". Only one irrelevant match for "Objective" for that matter. :-(
I used wrappers before but smart pointers sound like a better alternative for exposing a more complex C++ class hierachy to ObjC.
     
oliver  (op)
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Santa Monica, CA
Status: Offline
Reply With Quote
Jan 7, 2001, 09:43 PM
 
Oops, looks like Omni's search function doesn't work all that well, but plenty of info on the topic is available. Just opened one of the archives and will start reading. Again, thanks for the pointer! Very helpful.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:24 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2