Copyright ©1995 by NeXT Computer, Inc. All Rights Reserved.
| 1 |
Root Class
| Class
Object |
| Inherits From: | Object is the root class |
| The Foundation Kit also defines its own root class, NSObject. Foundation is a group of classes that provides the functionality of the Common classes (List, Hash, Storage, and so on) and other features to improve the object-oriented development process. For more information about NSObject and Foundation, see the Foundation Reference located on-line in /NextLibrary/Documentation/NextDev/Foundation. For information on using Object- and NSObject-based classes together, see HybridWorld in the Foundation Reference.
Initializing the Class |
| + initialize | Implemented by subclasses to initialize the class |
| Creating, Copying, and Freeing Instances |
| + alloc | Returns a new, uninitialized instance | |
| + allocFromZone:(NXZone *)zone | Returns a new, uninitialized instance allocated from zone | |
| + new | Returns a new, initialized instance | |
| Returns an exact copy of the receiver | ||
| Returns an exact copy of the receiver allocated from zone | ||
| Returns a pointer to the zone where the receiver resides | ||
| Deallocates the memory occupied by the receiver | ||
| + free | Returns nil (you can't free a class) |
| Initializing a New Instance |
| Initializes a new instance after it has been allocated |
| Identifying Classes |
| + (const char *)name | Returns the name of the class | |
| + class | Returns the receiver, a class object | |
| Returns the class object for the receiver's class | ||
| + superclass | Returns the class object for the receiver's superclass | |
| Returns the class object for the receiver's superclass |
| Identifying and Comparing Instances |
| Returns whether the receiver and anObject are the same | ||
| Returns an unsigned integer unique to the receiver | ||
| Returns the receiver, an instance | ||
| Implemented by subclasses to return the receiver's name | ||
| Writes information identifying the receiver to stream |
| Testing Inheritance Relationships |
| Returns whether the receiver inherits from aClassObject |
| Returns whether the receiver inherits from aClassName |
| Returns whether the receiver is an instance of aClassObject |
| Returns whether the receiver is an instance of aClassName |
| Testing Class Functionality |
| Returns whether the receiver can respond to aSelector | ||
| + (BOOL)instancesRespondTo:(SEL)aSelector | Returns whether instances can respond to aSelector |
| Testing for Protocol Conformance |
| + (BOOL)conformsTo:(Protocol *)aProtocol | Returns whether the receiver conforms to aProtocol | |
| Returns whether the receiver's class conforms to aProtocol |
| Sending Messages Determined at Run Time |
| Sends an aSelector message to the receiver | ||
| Sends an aSelector message with one argument | ||
| Sends an aSelector message with two arguments | ||
| Forwarding Messages |
| Implemented by subclasses to forward messages | ||
| Sends an aSelector message with argFrame arguments |
| Obtaining Method Information |
| Locates the receiver's implementation of aSelector | ||
| + (IMP)instanceMethodFor:(SEL)aSelector | Locates the implementation of aSelector |
| Returns information about the aSelector method |
| + (struct objc_method_description *)descriptionForInstanceMethod:(SEL)aSelector |
| Returns information about the aSelector instance method |
| Posing |
| + poseAs:aClassObject | Substitutes the receiving class for aClassObject |
| Enforcing Intentions |
| Indicates that aSelector isn't fully implemented | ||
| Generates an error if aSelector isn't implemented |
| Error Handling |
| Generates an unrecognized-selector error message | ||
| Generates a formatted error message using aString |
| Dynamic Loading |
| + finishLoading:(struct mach_header *)header | Implemented by a newly loaded class or category | |
| + startUnloading | Implemented by a class or category about to be unloaded |
| Archiving |
| Implemented by subclasses to read receiver from stream | ||
| Implemented by subclasses to write the receiver to stream | ||
| Implemented by subclasses to prepare for archiving | ||
| Implemented by subclasses to reinitialize the receiver | ||
| Implemented by subclasses to replace the receiver | ||
| + setVersion:(int)aVersion | Sets the class version number to aVersion | |
| + (int)version | Returns the version of the class definition |