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
quix...@dulcineatech.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to