Name
NSProtocolChecker — Mac OS X 10.0
Synopsis
This class is used to provide a
proxy for an object (the protocol
checker’s delegate) that filters messages sent to
the object based on a formal protocol. Cocoa’s
distributed objects system uses this class to improve the performance
of a distributed objects connection by limiting the messages sent an
object to those agreed upon in a protocol. Instances of
NSProtocolChecker are initialized with the method
initWithTarget:protocol:.
Target: is the object the protocol check will act
as a proxy for, while protocol: is the protocol
that defines what methods will be forwarded to the target object by
the protocol checker. Note that the argument type for
protocol: is a protocol object: Protocol *. To obtain a pointer to a protocol, use the
@protocol(protocolName) compiler directive.
|
|
@interface NSProtocolChecker : NSProxy
|
// Initializers
|
- (id)initWithTarget:(NSObject *)anObject protocol:(Protocol *)aProtocol; |
// Class Methods
|
+ (id)protocolCheckerWithTarget:(NSObject *)anObject protocol:(Protocol *)aProtocol; |
// Instance Methods
|
- (Protocol *)protocol;
|
- (NSObject *)target;
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access