• 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
Re: Cocoa Classes from C++?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Classes from C++?


  • Subject: Re: Cocoa Classes from C++?
  • From: Thomas Engelmeier <email@hidden>
  • Date: Wed, 28 May 2008 14:00:51 +0200


On 28.05.2008, at 01:50, Todd Heberlein wrote:

The gotchas that I often run into are: (1) Changing an Objective-C file to an Objective-C++ object (by renaming it to a .mm file) often causes me to rename a lot of files to .mm, because if the Objective- C class definition has a C++ object in it, every source code file that includes that Objective-C class definition needs to be renamed to a .mm file;

Does the PIMPL idiom help with that? i.e. declaring a pointer to a (implementation-private) struct that contains all C++ members?
That´s how I trimmed down compile times a decade ago and archieved a huge reduction of C++ clashes in an C-only SDK based product.


(3) I often have two container classes for some content -- one in C+ + used in my libraries and one in Objective-C so I can connect it to the GUI (e.g., via a controller), so I need to do a little work to keep them consistent.

Did you try to override -setValue:forKey: and -valueForKey: and mapping values directly into your C++ container?


Regards,
	Tom_E

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Cocoa Classes from C++? (From: "J. Todd Slack" <email@hidden>)
 >Re: Cocoa Classes from C++? (From: Andrew Farmer <email@hidden>)
 >Re: Cocoa Classes from C++? (From: Jens Alfke <email@hidden>)
 >Re: Cocoa Classes from C++? (From: Todd Heberlein <email@hidden>)

  • Prev by Date: Re: email
  • Next by Date: Re: email
  • Previous by thread: Re: Cocoa Classes from C++?
  • Next by thread: Re: Cocoa Classes from C++?
  • Index(es):
    • Date
    • Thread