Up
Authors
Richard Frith-Macdonald (richard@brainstorm.co.uk
)
Date: Generated at 2024-11-18 21:56:13 +0100
Copyright: (C) 1997 Free Software Foundation, Inc.
class_NSProxy
NSProxy
NSProxy
NSProxy->NSProxy
Declared in:
Foundation/NSProxy.h
Availability: OpenStep
The NSProxy class provides a basic implementation of a
class whose instances are used to stand in
for other objects. The class provides the most
basic methods of NSObject, and expects messages for
other methods to be forwarded to the real
object represented by the proxy. You must subclass
NSProxy to implement
-forwardInvocation:
to these real objects.
Note that NSProxy
is a different sort of
class than others in the GNUstep Base library in that
it is the only example of a root class besides
NSObject
. Thus, it implements the NSObject
protocol but is not a subclass of NSObject.
Instance Variables
+ (id)
alloc ;
Availability: OpenStep
Allocates and returns an NSProxy instance in the
default zone.
+ (id)
allocWithZone: (
NSZone *)z;
Availability: OpenStep
Allocates and returns an NSProxy instance in the
specified zone z .
+ (id)
autorelease ;
Availability: OpenStep
Returns the receiver.
+ (Class)
class ;
Availability: OpenStep
Returns the receiver.
+ (
NSString *)
description ;
Availability: OpenStep
Returns a string describing the receiver.
+ (BOOL)
isKindOfClass: (Class)aClass;
Availability: OpenStep
Returns NO
... the NSProxy class cannot
be an instance of any class.
+ (BOOL)
isMemberOfClass: (Class)aClass;
Availability: OpenStep
Returns YES
if aClass is
identical to the receiver, NO
otherwise.
+ (void)
load ;
Availability: OpenStep
An empty method provided for subclasses to override.
A dummy method...
+ (oneway void)
release ;
Availability: OpenStep
An empty method provided for subclasses to override.
A dummy method to ensure that the class can
safely be held in containers.
+ (BOOL)
respondsToSelector: (SEL)aSelector;
Availability: OpenStep
Returns YES
if the receiver responds
to aSelector , NO
otherwise.
+ (id)
retain ;
Availability: OpenStep
Returns the receiver.
+ (
NSUInteger )
retainCount ;
Availability: OpenStep
Returns the maximum unsigned
integer value.
- (id)
autorelease ;
Availability: OpenStep
Adds the receiver to the current autorelease pool and
returns self.
- (Class)
class ;
Availability: OpenStep
Returns the class of the receiver.
- (BOOL)
conformsToProtocol: (Protocol*)aProtocol;
Availability: OpenStep
Calls the
-forwardInvocation:
method to determine if the 'real' object referred to
by the proxy conforms to
aProtocol . Returns
the result.
NB. The default operation of
-forwardInvocation:
is to raise an exception.
- (void)
dealloc ;
Availability: OpenStep
Frees the memory used by the receiver.
- (
NSString *)
description ;
Availability: OpenStep
Returns a text description of the receiver.
- (void)
forwardInvocation: (
NSInvocation *)anInvocation;
Availability: OpenStep
Subclasses
must override this method.
Raises an NSInvalidArgumentException
.
- (
NSUInteger )
hash ;
Availability: OpenStep
Returns the address of the receiver... so it can be
stored in a dictionary.
- (id)
init ;
Availability: OpenStep
This is a designated initialiser for the class.
Subclasses
must override this method.
Initialises the receiver and returns the
resulting instance.
- (BOOL)
isEqual: (id)anObject;
Availability: OpenStep
Tests for pointer equality with anObject .
- (BOOL)
isKindOfClass: (Class)aClass;
Availability: OpenStep
Calls the
-forwardInvocation:
method to determine if the 'real' object referred to
by the proxy is an instance of the specified class.
Returns the result.
NB. The default
operation of
-forwardInvocation:
is to raise an exception.
- (BOOL)
isMemberOfClass: (Class)aClass;
Availability: OpenStep
Calls the
-forwardInvocation:
method to determine if the 'real' object referred to
by the proxy is an instance of the specified class.
Returns the result.
NB. The default
operation of
-forwardInvocation:
is to raise an exception.
- (BOOL)
isProxy ;
Availability: OpenStep
Returns YES
.
- (
NSMethodSignature *)
methodSignatureForSelector: (SEL)aSelector;
Availability: OpenStep
If we respond to the method directly, create and return
a method signature. Otherwise raise an exception.
- (oneway void)
release ;
Availability: OpenStep
Decrement the retain count for the receiver...
deallocate if it would become negative.
- (BOOL)
respondsToSelector: (SEL)aSelector;
Availability: OpenStep
If we respond to the method directly, return
YES
, otherwise forward this request to
the object we are acting as a proxy for.
- (id)
retain ;
Availability: OpenStep
Increment the retain count for the receiver.
- (
NSUInteger )
retainCount ;
Availability: OpenStep
Return the retain count for the receiver.
- (id)
self ;
Availability: OpenStep
Returns the receiver.
- (Class)
superclass ;
Availability: OpenStep
Returns the superclass of the receiver's class.
- (
NSZone *)
zone ;
Availability: OpenStep
Returns the zone in which the receiver was
allocated.
Instance Variables for NSProxy Class
@public Class
isa ;
Availability: OpenStep
Description forthcoming.
Up