• 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: Private Method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Private Method?


  • Subject: Re: Private Method?
  • From: Don Quixote de la Mancha <email@hidden>
  • Date: Mon, 07 Nov 2011 17:16:44 -0800

While the method isn't publicly visible to other compilation units,
there will be an entry for its selector in the table of selectors that
is possessed by each class.

A simple-minded way to do Objective-C  method dispatch would be to
have an an array, list or tree of structures, with one struct element
being the selector and the other being a pointer to the C function
that is the actual implement of the method.

objc_msgsend() would then search the array, list or tree looking for
that selector, then call the C function.

When you ask a class if it responds to a selector, the class searches
its own table of selector/function pointer pairs, returning YES if it
finds a matching selector in the table.

I don't really know, but it seems to me that there just *has* to be a
way to enumerate all of the elements in those selector tables.  If
there is, then no method would be private.

--
Don Quixote de la Mancha
Dulcinea Technologies Corporation
Software of Elegance and Beauty
http://www.dulcineatech.com
email@hidden
_______________________________________________

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

  • Follow-Ups:
    • Re: Private Method?
      • From: Graham Cox <email@hidden>
    • Re: Private Method?
      • From: Fritz Anderson <email@hidden>
    • Re: Private Method?
      • From: David Duncan <email@hidden>
References: 
 >Private Method? (From: Bryan Harrison <email@hidden>)
 >Re: Private Method? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Allocating too much memory kills my App rather than returning NULL
  • Next by Date: Re: Private Method?
  • Previous by thread: Re: Private Method?
  • Next by thread: Re: Private Method?
  • Index(es):
    • Date
    • Thread