Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part III: Appendixes > Root Object Methods and Categories

Root Object Methods and Categories

Table B.8 summarizes the instance and class methods defined for the root object Object.

Table B.8. Root Object Methods
Method TypeMethods
Creation and copying methods 50
+new;
+free;
-free;
+alloc;
-copy;
+allocFromZone: (void *) zone;
-copyFromZone: (void *) zone;
-(void *) zone;

Initialization methods 50
+ initialize;
- init;

Introspection 50
+ class;
+superclass;
+(const char *) name;
-class;
-superclass;
-(const char *) name;
-(BOOL) isKindOf: classObject;
-(BOOL) isMemberOf: classObject;
-(BOOL) isKindOfClassNamed: (const char *)
className;
-(BOOL) isMemberOfClassNamed: (const char *)
className;
+(BOOL) instancesRespondTo: (SEL)
selector;
-(BOOL) respondsTo: selector;
- (BOOL) conformsTo: (Protocol *)
protocol;
+(BOOL) conformsTo: (Protocol *) protocol;

Identifying and comparing instances 50
-self;
- (unsigned int) hash;-(BOOL) isEqual: object;

Information about methods 50
-(struct objc_method_description *)
descriptionForMethod: (SEL) selector;
+(struct objc_method_description *)
descriptionForInstanceMethod: (SEL) selector;
-(IMP) methodFor: (SEL) selector;
+(IMP) instanceMethodFor: (SEL) selector;

Performing methods and forwarding 50
-perform: (SEL) selector;-perform: (SEL) selector with: object;
-perform: (SEL) selector with: object1 with:
object2;
-performv: (SEL) selector : (marg_list) args;
-forward: (SEL) selector : (marg_list) args;

Posing Enforcing intentions 50
+poseAs: classObject;
-subclassResponsibility: (SEL) selector;
-notImplemented: (SEL) selector;

Error handling 50
-doesNotRecognize: (SEL) selector;
-error: (const char *) format, ...;

Debugging Archiving 50
-(void) printForDebugger: (void *) stream;
-awake;-read: (void *) stream;
-write: (void *) stream;
+setVersion: (int) version;
+(int) version;



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial