Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does < > mean / represent in a class interface?

I am sure I have read this somewhere, Can anyone tell me what the < > represent in the following interface?

@interface GameFinder : NSObject <NSNetServiceBrowserDelegate>
@end

is NSObject adopting <NSNetServiceBrowserDelegate> ?

EDIT

One thing that is confusing me ...

in the example I have.The interface shows NSNetServiceBrowserDelegate

@interface ITunesFinder : NSObject <NSNetServiceBrowserDelegate>
@end

but the implementation shows netServiceBrowser, are these one in the same?

@implementation ITunesFinder
-(void) netServiceBrowser: (NSNetServiceBrowser *) browser
           didFindService: (NSNetService *) service
               moreComing: (BOOL) moreComing {

gary

like image 630
fuzzygoat Avatar asked Dec 18 '25 02:12

fuzzygoat


1 Answers

The angle brackets denote Protocols that this class meets. There are details on Protocols int the Objective-C Wikipedia article that may help clear up some things for you. Protocols contain both required and optional routines that your class could supply. In the latter case if the routine is not implemented by your class a default implementation/behavior is used instead.

like image 168
fbrereto Avatar answered Dec 20 '25 18:12

fbrereto