home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / Foundation.framework / Versions / B / Headers / NSObject.h < prev    next >
Encoding:
Text File  |  1997-02-27  |  2.8 KB  |  128 lines

  1. /*    NSObject.h
  2.     Definitions of very basic things
  3.     Copyright 1994-1996, NeXT Software, Inc.  All rights reserved.
  4. */
  5.  
  6. #import <Foundation/NSObjCRuntime.h>
  7. #import <Foundation/NSZone.h>
  8.  
  9. @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
  10. @class Protocol;
  11.  
  12. /***************    Basic protocols        ***************/
  13.  
  14. @protocol NSObject
  15.  
  16. - (BOOL)isEqual:(id)object;
  17. - (unsigned)hash;
  18.  
  19. - (Class)superclass;
  20. - (Class)class;
  21. - (id)self;
  22. - (NSZone *)zone;
  23.  
  24. - (id)performSelector:(SEL)aSelector;
  25. - (id)performSelector:(SEL)aSelector withObject:(id)object;
  26. - (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2;
  27.  
  28. - (BOOL)isProxy;
  29.  
  30. - (BOOL)isKindOfClass:(Class)aClass;
  31. - (BOOL)isMemberOfClass:(Class)aClass;
  32. - (BOOL)conformsToProtocol:(Protocol *)aProtocol;
  33.  
  34. - (BOOL)respondsToSelector:(SEL)aSelector;
  35.  
  36. - (id)retain;
  37. - (oneway void)release;
  38. - (id)autorelease;
  39. - (unsigned)retainCount;
  40.  
  41. - (NSString *)description;
  42.  
  43. @end
  44.  
  45. @protocol NSCopying
  46.  
  47. - (id)copyWithZone:(NSZone *)zone;
  48.  
  49. @end
  50.  
  51. @protocol NSMutableCopying
  52.  
  53. - (id)mutableCopyWithZone:(NSZone *)zone;
  54.  
  55. @end
  56.  
  57. @protocol NSCoding
  58.  
  59. - (void)encodeWithCoder:(NSCoder *)aCoder;
  60. - (id)initWithCoder:(NSCoder *)aDecoder;
  61.  
  62. @end
  63.  
  64. /***********    Base class        ***********/
  65.  
  66. @interface NSObject <NSObject> {
  67.     Class    isa;
  68. }
  69.  
  70. + (void)load;
  71.  
  72. + (void)initialize;
  73. - (id)init;
  74.  
  75. + (id)new;
  76. + (id)allocWithZone:(NSZone *)zone;
  77. + (id)alloc;
  78. - (void)dealloc;
  79.  
  80. - (id)copy;
  81. - (id)mutableCopy;
  82.  
  83. + (id)copyWithZone:(NSZone *)zone;
  84. + (id)mutableCopyWithZone:(NSZone *)zone;
  85.  
  86. + (Class)superclass;
  87. + (Class)class;
  88. + (void)poseAsClass:(Class)aClass;
  89. + (BOOL)instancesRespondToSelector:(SEL)aSelector;
  90. + (BOOL)conformsToProtocol:(Protocol *)protocol;
  91. - (IMP)methodForSelector:(SEL)aSelector;
  92. + (IMP)instanceMethodForSelector:(SEL)aSelector;
  93. + (int)version;
  94. + (void)setVersion:(int)aVersion;
  95. - (void)doesNotRecognizeSelector:(SEL)aSelector;
  96. - (void)forwardInvocation:(NSInvocation *)anInvocation;
  97. - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector;
  98.  
  99. #if !defined(STRICT_OPENSTEP) && !defined(STRICT_40)
  100. + (NSMethodSignature *)instanceMethodSignatureForSelector:(SEL)aSelector;
  101. #endif
  102.  
  103. + (NSString *)description;
  104.  
  105. - (Class)classForCoder;
  106. - (id)replacementObjectForCoder:(NSCoder *)aCoder;
  107. - (id)awakeAfterUsingCoder:(NSCoder *)aDecoder;
  108.  
  109. @end
  110.  
  111. /***********    Object Allocation / Deallocation        *******/
  112.     
  113. FOUNDATION_EXPORT NSObject *NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone);
  114.  
  115. FOUNDATION_EXPORT void NSDeallocateObject(NSObject *object);
  116.  
  117. FOUNDATION_EXPORT NSObject *NSCopyObject(NSObject *object, unsigned extraBytes, NSZone *zone);
  118.  
  119. FOUNDATION_EXPORT BOOL NSShouldRetainWithZone(NSObject *anObject, NSZone *requestedZone);
  120.  
  121. FOUNDATION_EXPORT void NSIncrementExtraRefCount(id object);
  122.  
  123. FOUNDATION_EXPORT BOOL NSDecrementExtraRefCountWasZero(id object);
  124.  
  125. FOUNDATION_EXPORT unsigned NSExtraRefCount(id object);
  126.  
  127.  
  128.