2002-08-17 05:27:34 +00:00
|
|
|
#ifndef __ruamoko_Object_h
|
|
|
|
#define __ruamoko_Object_h
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2010-12-24 06:34:54 +00:00
|
|
|
#include "runtime.h"
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2004-11-11 00:34:00 +00:00
|
|
|
@class Protocol;
|
|
|
|
|
2003-08-01 16:37:44 +00:00
|
|
|
@protocol Object
|
2003-07-29 18:02:03 +00:00
|
|
|
- (Class) class;
|
|
|
|
- (Class) superclass;
|
|
|
|
- (BOOL) isEqual: (id)anObject;
|
|
|
|
- (BOOL) isKindOfClass: (Class)aClass;
|
|
|
|
- (BOOL) isMemberOfClass: (Class)aClass;
|
|
|
|
#if 0
|
|
|
|
- (BOOL) isProxy;
|
|
|
|
#endif // proxies
|
|
|
|
- (unsigned) hash;
|
|
|
|
- (id) self;
|
|
|
|
- (string) description;
|
|
|
|
|
|
|
|
- (id) performSelector: (SEL)aSelector;
|
|
|
|
- (id) performSelector: (SEL)aSelector
|
|
|
|
withObject: (id)anObject;
|
|
|
|
- (id) performSelector: (SEL)aSelector
|
|
|
|
withObject: (id)anObject
|
|
|
|
withObject: (id)anotherObject;
|
|
|
|
- (BOOL) respondsToSelector: (SEL)aSelector;
|
|
|
|
- (BOOL) conformsToProtocol: (Protocol)aProtocol;
|
|
|
|
|
|
|
|
- (id) retain;
|
|
|
|
- (id) autorelease;
|
|
|
|
- (/*oneway*/ void) release;
|
2003-08-01 17:38:52 +00:00
|
|
|
- (unsigned) retainCount;
|
2003-07-29 18:02:03 +00:00
|
|
|
@end
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2003-07-29 18:02:03 +00:00
|
|
|
@protocol Copying
|
2010-12-01 23:04:18 +00:00
|
|
|
/**
|
|
|
|
Returns a copy of the receiver.
|
|
|
|
*/
|
2003-07-29 18:02:03 +00:00
|
|
|
- copy;
|
|
|
|
@end
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2010-12-01 23:04:18 +00:00
|
|
|
/**
|
|
|
|
The Ruamoko root class
|
|
|
|
*/
|
2003-07-29 18:02:03 +00:00
|
|
|
@interface Object <Object>
|
|
|
|
{
|
|
|
|
Class isa;
|
2003-08-01 21:20:04 +00:00
|
|
|
unsigned retainCount;
|
2003-07-29 18:02:03 +00:00
|
|
|
}
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2003-07-29 18:02:03 +00:00
|
|
|
+ (id) alloc;
|
|
|
|
+ (id) new;
|
|
|
|
+ (Class) class;
|
|
|
|
+ (string) description;
|
|
|
|
+ (void) initialize;
|
|
|
|
+ (IMP) instanceMethodForSelector: (SEL)aSelector;
|
|
|
|
#if 0
|
|
|
|
+ (MethodSignature) instanceMethodSignatureForSelector: (SEL)aSelector;
|
|
|
|
#endif // invocations
|
|
|
|
+ (BOOL) instancesRespondToSelector: (SEL)aSelector;
|
|
|
|
+ (BOOL) respondsToSelector: (SEL)aSelector;
|
|
|
|
+ (BOOL) conformsToProtocol: (Protocol)aProtocol;
|
|
|
|
+ (BOOL) isKindOfClass: (Class)aClass;
|
|
|
|
+ (void) poseAsClass: (Class)aClass;
|
|
|
|
+ (Class) superclass;
|
|
|
|
|
|
|
|
- (id) init;
|
|
|
|
- (void) dealloc;
|
|
|
|
- (void) doesNotRecognizeSelector: (SEL)aSelector;
|
|
|
|
#if 0
|
|
|
|
- (void) forwardInvocation: (Invocation)anInvocation;
|
|
|
|
#endif // invocations
|
|
|
|
#if 0
|
|
|
|
- (BOOL) isProxy;
|
|
|
|
#endif // proxies
|
|
|
|
- (IMP) methodForSelector: (SEL)aSelector;
|
|
|
|
#if 0
|
|
|
|
- (MethodSignature) methodSignatureForSelector: (SEL)aSelector;
|
|
|
|
#endif // invocations
|
|
|
|
|
|
|
|
- (id) copy;
|
|
|
|
- (id) mutableCopy;
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2003-07-29 18:02:03 +00:00
|
|
|
@end
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2003-07-29 18:02:03 +00:00
|
|
|
@interface Object (error)
|
2002-08-14 15:40:30 +00:00
|
|
|
|
2003-07-29 18:02:03 +00:00
|
|
|
- (void) error: (string)formatString, ...;
|
2002-08-14 15:40:30 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2002-08-17 05:27:34 +00:00
|
|
|
#endif //__ruamoko_Object_h
|