home *** CD-ROM | disk | FTP | other *** search
- /* NSObject.h
- Definitions of very basic things
- Copyright 1994-1996, NeXT Software, Inc. All rights reserved.
- */
-
- #import <Foundation/NSObjCRuntime.h>
- #import <Foundation/NSZone.h>
-
- @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
- @class Protocol;
-
- /*************** Basic protocols ***************/
-
- @protocol NSObject
-
- - (BOOL)isEqual:(id)object;
- - (unsigned)hash;
-
- - (Class)superclass;
- - (Class)class;
- - (id)self;
- - (NSZone *)zone;
-
- - (id)performSelector:(SEL)aSelector;
- - (id)performSelector:(SEL)aSelector withObject:(id)object;
- - (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2;
-
- - (BOOL)isProxy;
-
- - (BOOL)isKindOfClass:(Class)aClass;
- - (BOOL)isMemberOfClass:(Class)aClass;
- - (BOOL)conformsToProtocol:(Protocol *)aProtocol;
-
- - (BOOL)respondsToSelector:(SEL)aSelector;
-
- - (id)retain;
- - (oneway void)release;
- - (id)autorelease;
- - (unsigned)retainCount;
-
- - (NSString *)description;
-
- @end
-
- @protocol NSCopying
-
- - (id)copyWithZone:(NSZone *)zone;
-
- @end
-
- @protocol NSMutableCopying
-
- - (id)mutableCopyWithZone:(NSZone *)zone;
-
- @end
-
- @protocol NSCoding
-
- - (void)encodeWithCoder:(NSCoder *)aCoder;
- - (id)initWithCoder:(NSCoder *)aDecoder;
-
- @end
-
- /*********** Base class ***********/
-
- @interface NSObject <NSObject> {
- Class isa;
- }
-
- + (void)load;
-
- + (void)initialize;
- - (id)init;
-
- + (id)new;
- + (id)allocWithZone:(NSZone *)zone;
- + (id)alloc;
- - (void)dealloc;
-
- - (id)copy;
- - (id)mutableCopy;
-
- + (id)copyWithZone:(NSZone *)zone;
- + (id)mutableCopyWithZone:(NSZone *)zone;
-
- + (Class)superclass;
- + (Class)class;
- + (void)poseAsClass:(Class)aClass;
- + (BOOL)instancesRespondToSelector:(SEL)aSelector;
- + (BOOL)conformsToProtocol:(Protocol *)protocol;
- - (IMP)methodForSelector:(SEL)aSelector;
- + (IMP)instanceMethodForSelector:(SEL)aSelector;
- + (int)version;
- + (void)setVersion:(int)aVersion;
- - (void)doesNotRecognizeSelector:(SEL)aSelector;
- - (void)forwardInvocation:(NSInvocation *)anInvocation;
- - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector;
-
- #if !defined(STRICT_OPENSTEP) && !defined(STRICT_40)
- + (NSMethodSignature *)instanceMethodSignatureForSelector:(SEL)aSelector;
- #endif
-
- + (NSString *)description;
-
- - (Class)classForCoder;
- - (id)replacementObjectForCoder:(NSCoder *)aCoder;
- - (id)awakeAfterUsingCoder:(NSCoder *)aDecoder;
-
- @end
-
- /*********** Object Allocation / Deallocation *******/
-
- FOUNDATION_EXPORT NSObject *NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone);
-
- FOUNDATION_EXPORT void NSDeallocateObject(NSObject *object);
-
- FOUNDATION_EXPORT NSObject *NSCopyObject(NSObject *object, unsigned extraBytes, NSZone *zone);
-
- FOUNDATION_EXPORT BOOL NSShouldRetainWithZone(NSObject *anObject, NSZone *requestedZone);
-
- FOUNDATION_EXPORT void NSIncrementExtraRefCount(id object);
-
- FOUNDATION_EXPORT BOOL NSDecrementExtraRefCountWasZero(id object);
-
- FOUNDATION_EXPORT unsigned NSExtraRefCount(id object);
-
-
-