ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/FoundationKit/Protocols/NSObject.rtf

This is NSObject.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s6 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSObject 
pard s1 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Adopted By:tab b0 fs28 f1 NSObject
fi0 NSProxy
fs20 
fs28 s9 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSObject.h 
fs20 
fs28 pard s23 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Protocol Description
fs14 
fs28 pard s2 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 The NSObject protocol declares methods that all objects'd0no matter which root class they descend from (NSObject, NSProxy, or another root class)'d0should implement to work well within OpenStep. Some of the methods in this protocol reveal an object'27s primary attributes: its position in the class hierarchy, its conformance to other protocols, and whether it responds to specific messages. Others let it be manipulated in various ways. For example, it can be asked to perform methods that are determined at runtime (using the b perform:...b0  methods) or to participate in OpenStep'27s automatic deallocation scheme (using the b retainb0 , b releaseb0 , and b autoreleaseb0  methods). 
fs16 
fs28 By conforming to this protocol an object advertises that it has the basic behaviors necessary to work with the OpenStep'27s container classes (such as NSArray or NSDictionary).
fs16 
fs28 pard s23 li100 fi0 ri1007 ql f0 b fs24 
fs28 Identifying and Comparing Instances
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (unsigned int)b hashb0 tab Returns an unsigned integer that can be used as a table address in a hash table structure. Two objects that are equal must hash to the same value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b isEqual:b0 (id)i anObjecti0 tab Returns YES if the receiver and i anObjecti0  have equal values; otherwise returns NO.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b selfb0 tab Returns the receiver.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Identifying Class and Superclass
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (Class)b classb0 tab Returns the class object for the receiver'27s class.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (Class)b superclassb0 tab Returns the class object for the receiver'27s superclass.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Determining Allocation Zones
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSZone *)b zoneb0 tab Returns a pointer to the zone from which the receiver was allocated.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Sending Messages Determined at Run Time
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (id)b perform:b0 (SEL)i aSelectori0 tab Sends an i aSelectori0  message to the receiver and returns the result of the message. If i aSelectori0  is null, an NSInvalidArgumentException is raised.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b perform:b0 (SEL)i aSelectori0 tab Sends an i aSelectori0  message to the receiver with i anObject
s13 li7030 fi-6553 fi-5796 i0 b withObject:b0 (id)i anObjecti0 tab tab as an argument. If i aSelectori0  is null, an NSInvalidArgumentException is raised.
s12 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b perform:b0 (SEL)i aSelectori0 tab Sends the receiver an i aSelectori0  message with i anObjecti0  and
s13 li7030 fi-6553 fi-5796 b withObject:b0 (id)i anObjecti0 tab i tab anotherObjecti0  as arguments. If i aSelectori0  is null, an
b withObject:b0 (id)i anotherObjecti0 tab  tab NSInvalidArgumentException is raised.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Identifying Proxies
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b isProxyb0 tab Returns YES to indicate that the receiver is an NSProxy, rather than an object that descends from NSObject. Otherwise, it returns NO.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Testing Inheritance Relationships
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b isKindOfClass:b0 (Class)i aClassi0 tab Returns YES if the receiver is an instance of i aClassi0  or an instance of any class that inherits from i aClassi0 . Otherwise, it returns NO.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b isMemberOfClass:b0 (Class)i aClassi0 tab Returns YES if the receiver is an instance of i aClassi0 . Otherwise, it returns NO.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Testing for Protocol Conformance
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b conformsToProtocol:b0 (Protocol *)i aProtocoli0 tab 
s13 li7030 fi-6553 fi-5796 tab Returns YES if the class of the receiver conforms to i aProtocoli0 , and NO if it doesn'27t.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Testing Class Functionality
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b respondsToSelector:b0 (SEL)i aSelectori0 tab Returns YES if the receiver implements or inherits a method that can respond to i aSelectori0  messages, and NO if it doesn'27t.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Managing Reference Counts
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (id)b autoreleaseb0 tab As defined in the NSObject class, decrements the receiver'27s reference count. When the count reaches 0, adds the object to the current autorelease pool. Returns b selfb0 . Objects in the pool are released later, typically at the top of the event loop.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (oneway void)b releaseb0 tab As defined in the NSObject class, decrements the receiver'27s reference count. When the count reaches 0, the object is automatically deallocated immediately. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b retainb0 tab As defined in the NSObject class, b retainb0  increments the receiver'27s reference count. You send an object a b retainb0  message when you want to prevent it from being deallocated without your express permission. Returns b selfb0  as a convenience.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (unsigned int)b retainCountb0 tab Returns the receiver'27s reference count for debugging purposes.
pard s23 li100 fi0 ri1007 ql f0 b fs48 
fs28 Describing the Object
fs14 
fs28 pard s12 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSString *)b descriptionb0 tab Returns a human-readable description of the receiver.
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.