00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #import "objfw-defs.h"
00013
00014 #include <stddef.h>
00015 #include <stdint.h>
00016
00017 #ifdef OF_OBJFW_RUNTIME
00018 # import <objfw-rt.h>
00019 #else
00020 # import <objc/objc.h>
00021 #endif
00022
00026 typedef enum __of_comparison_result {
00028 OF_ORDERED_ASCENDING = -1,
00030 OF_ORDERED_SAME = 0,
00032 OF_ORDERED_DESCENDING = 1
00033 } of_comparison_result_t;
00034
00038 typedef struct __of_range {
00039 size_t start;
00040 size_t length;
00041 } of_range_t;
00042
00046 @interface OFObject
00047 {
00049 Class isa;
00050 }
00051
00058 + (void)load;
00059
00067 + (void)initialize;
00068
00078 + alloc;
00079
00083 + (Class)class;
00084
00088 + (const char*)className;
00089
00095 + (BOOL)isSubclassOfClass: (Class)class_;
00096
00100 + (Class)superclass;
00101
00109 + (BOOL)instancesRespondToSelector: (SEL)selector;
00110
00117 + (BOOL)conformsToProtocol: (Protocol*)protocol;
00118
00124 + (IMP)instanceMethodForSelector: (SEL)selector;
00125
00133 + (IMP)setImplementation: (IMP)newimp
00134 forClassMethod: (SEL)selector;
00135
00143 + (IMP)replaceClassMethod: (SEL)selector
00144 withMethodFromClass: (Class)class_;
00145
00153 + (IMP)setImplementation: (IMP)newimp
00154 forInstanceMethod: (SEL)selector;
00155
00163 + (IMP)replaceInstanceMethod: (SEL)selector
00164 withMethodFromClass: (Class)class_;
00165
00175 - init;
00176
00180 - (Class)class;
00181
00185 - (const char*)className;
00186
00191 - (BOOL)isKindOfClass: (Class)class_;
00192
00197 - (BOOL)respondsToSelector: (SEL)selector;
00198
00203 - (BOOL)conformsToProtocol: (Protocol*)protocol;
00204
00210 - (IMP)methodForSelector: (SEL)selector;
00211
00221 - (BOOL)isEqual: (OFObject*)obj;
00222
00231 - (uint32_t)hash;
00232
00241 - (void)addMemoryToPool: (void*)ptr;
00242
00250 - (void*)allocMemoryWithSize: (size_t)size;
00251
00261 - (void*)allocMemoryForNItems: (size_t)nitems
00262 withSize: (size_t)size;
00263
00271 - (void*)resizeMemory: (void*)ptr
00272 toSize: (size_t)size;
00273
00283 - (void*)resizeMemory: (void*)ptr
00284 toNItems: (size_t)nitems
00285 withSize: (size_t)size;
00286
00293 - (void)freeMemory: (void*)ptr;
00294
00301 - retain;
00302
00306 - (size_t)retainCount;
00307
00314 - (void)release;
00315
00320 - autorelease;
00321
00327 - (void)dealloc;
00328 @end
00329
00333 @protocol OFCopying
00337 - copy;
00338 @end
00339
00346 @protocol OFMutableCopying
00350 - mutableCopy;
00351 @end
00352
00353 extern size_t of_pagesize;