• 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: Class design question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class design question


  • Subject: Re: Class design question
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Sun, 13 Feb 2005 22:13:51 +0100

At 14:36 Uhr -0500 13.02.2005, Ken Tozier wrote:
Indexing is the part I do have solidly worked out. The basic conundrum was: Do I use the easier to maintain (and highly bloated) one class for each type, or go the more obscure, yet highly compact, function pointer route. I'm equally comfortable with either but if this project gets to a decent state, I'm thinking of open sourcing it and want to make it friendly enough that other programmers won't be completely confused.

Ken,

try the middle ground: Create a base class that implements the functionality common to all of them, then build an array of 'Class's, or an NSDictionary of them, which you can use to map between types in a file and their classes.

If you wanna take advantage of ObjC, you could even use NSStringFromClass() and NSClassFromString() instead of the indexes.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Class design question (From: Ken Tozier <email@hidden>)
 >Re: Class design question (From: Jason Jobe <email@hidden>)
 >Re: Class design question (From: Ken Tozier <email@hidden>)
 >Re: Class design question (From: Jason Jobe <email@hidden>)
 >Re: Class design question (From: Ken Tozier <email@hidden>)
 >Re: Class design question (From: Andy Armstrong <email@hidden>)
 >Re: Class design question (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Class design question
  • Next by Date: Motion Blur
  • Previous by thread: Re: Class design question
  • Next by thread: Re: Class design question
  • Index(es):
    • Date
    • Thread