Re: Private Method?
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