17 #include "objfw-defs.h" 19 #ifndef __STDC_LIMIT_MACROS 20 # define __STDC_LIMIT_MACROS 22 #ifndef __STDC_CONSTANT_MACROS 23 # define __STDC_CONSTANT_MACROS 35 OF_ASSUME_NONNULL_BEGIN
81 of_range(
size_t start,
size_t length)
113 of_point(
float x,
float y)
140 of_dimension(
float width,
float height)
169 of_rectangle(
float x,
float y,
float width,
float height)
173 of_dimension(width, height)
208 - (bool)isKindOfClass: (Class)class_;
217 - (bool)isMemberOfClass: (Class)class_;
226 - (bool)respondsToSelector: (
SEL)selector;
234 - (bool)conformsToProtocol: (Protocol *)protocol;
242 - (nullable IMP)methodForSelector: (
SEL)selector;
250 - (nullable const
char *)typeEncodingForSelector: (
SEL)selector;
258 - (nullable id)performSelector: (
SEL)selector;
268 - (nullable id)performSelector: (
SEL)selector
269 withObject: (nullable
id)object;
281 - (nullable id)performSelector: (
SEL)selector
282 withObject: (nullable
id)object1
283 withObject: (nullable
id)object2;
297 - (bool)isEqual: (nullable
id)object;
457 + (bool)isSubclassOfClass: (Class)class_;
473 + (bool)instancesRespondToSelector: (
SEL)selector;
481 + (bool)conformsToProtocol: (Protocol *)protocol;
491 + (nullable IMP)instanceMethodForSelector: (
SEL)selector;
500 + (nullable
const char *)typeEncodingForInstanceSelector: (
SEL)selector;
518 + (nullable IMP)replaceClassMethod: (
SEL)selector
519 withMethodFromClass: (Class)class_;
529 + (nullable IMP)replaceInstanceMethod: (
SEL)selector
530 withMethodFromClass: (Class)class_;
544 + (nullable IMP)replaceClassMethod: (
SEL)selector
545 withImplementation: (IMP)implementation
546 typeEncoding: (
const char *)typeEncoding;
560 + (nullable IMP)replaceInstanceMethod: (
SEL)selector
561 withImplementation: (IMP)implementation
562 typeEncoding: (
const char *)typeEncoding;
582 + (void)inheritMethodsFromClass: (Class)class_;
592 + (BOOL)resolveClassMethod: (
SEL)selector;
602 + (BOOL)resolveInstanceMethod: (
SEL)selector;
654 - (nullable
void *)allocMemoryWithSize: (
size_t)size;
667 - (nullable
void *)allocMemoryWithSize: (
size_t)size
668 count: (size_t)count;
680 - (nullable
void *)resizeMemory: (nullable
void *)pointer
695 - (nullable
void *)resizeMemory: (nullable
void *)pointer
697 count: (
size_t)count;
706 - (void)freeMemory: (nullable
void *)pointer;
723 - (void)performSelector: (
SEL)selector
735 - (void)performSelector: (
SEL)selector
736 withObject: (nullable id)
object 750 - (void)performSelector: (
SEL)selector
751 withObject: (nullable id)object1
752 withObject: (nullable
id)object2
755 #ifdef OF_HAVE_THREADS 763 - (void)performSelector: (
SEL)selector
765 waitUntilDone: (
bool)waitUntilDone;
777 - (void)performSelector: (
SEL)selector
779 withObject: (nullable
id)
object 780 waitUntilDone: (bool)waitUntilDone;
794 - (void)performSelector: (
SEL)selector
796 withObject: (nullable
id)object1
797 withObject: (nullable id)object2
798 waitUntilDone: (
bool)waitUntilDone;
806 - (void)performSelectorOnMainThread: (
SEL)selector
807 waitUntilDone: (bool)waitUntilDone;
818 - (void)performSelectorOnMainThread: (
SEL)selector
819 withObject: (nullable id)
object 820 waitUntilDone: (
bool)waitUntilDone;
833 - (void)performSelectorOnMainThread: (
SEL)selector
834 withObject: (nullable id)object1
835 withObject: (nullable
id)object2
836 waitUntilDone: (bool)waitUntilDone;
846 - (void)performSelector: (
SEL)selector
860 - (void)performSelector: (
SEL)selector
862 withObject: (nullable
id)
object 877 - (void)performSelector: (
SEL)selector
879 withObject: (nullable
id)object1
880 withObject: (nullable id)object2
895 - (nullable id)forwardingTargetForSelector: (
SEL)selector;
905 - (void)doesNotRecognizeSelector: (
SEL)selector OF_NO_RETURN;
957 - (of_comparison_result_t)compare: (id <OFComparing>)object;
963 extern id of_alloc_object(Class class_,
size_t extraSize,
964 size_t extraAlignment,
void *_Nullable *_Nullable extra);
965 extern void OF_NO_RETURN_FUNC of_method_not_found(
id self,
SEL _cmd);
966 extern uint32_t of_hash_seed;
971 OF_ASSUME_NONNULL_END
973 #import "OFObject+KeyValueCoding.h" 974 #import "OFObject+Serialization.h" bool retainWeakReference()
Retain a weak reference to this object.
bool allowsWeakReference()
Returns whether the class allows weak references.
Definition: OFObject.h:46
of_dimension_t size
Definition: OFObject.h:156
OFString * className()
Returns the name of the class as a string.
Definition: OFObject.m:282
A protocol for the creation of mutable copies.
Definition: OFObject.h:935
A point.
Definition: OFObject.h:98
A dimension.
Definition: OFObject.h:125
id copy()
Returns the class.
Definition: OFObject.m:1133
void dealloc()
Deallocates the object.
Definition: OFObject.m:1031
Definition: OFObject.h:48
A class for handling strings.
Definition: OFString.h:114
float x
Definition: OFObject.h:100
Definition: OFObject.h:44
Definition: OFObject.h:58
OFString * description()
Returns a description for the class, which is usually the class name.
Definition: OFObject.m:337
id self()
Returns the receiver.
float height
Definition: OFObject.h:129
float y
Definition: OFObject.h:102
id init()
Initializes an already allocated object.
Definition: OFObject.m:488
uint32_t hash()
Calculates a hash for the object.
float width
Definition: OFObject.h:127
id alloc()
Allocates memory for an instance of the class and sets up the memory pool for the object...
Definition: OFObject.m:267
A protocol for the creation of copies.
Definition: OFObject.h:914
double of_time_interval_t
A time interval in seconds.
Definition: OFObject.h:91
of_point_t origin
Definition: OFObject.h:154
A protocol for comparing objects.
size_t length
Definition: OFObject.h:70
A rectangle.
Definition: OFObject.h:152
Definition: OFObject.h:56
The root class for all other classes inside ObjFW.
Definition: OFObject.h:379
A range.
Definition: OFObject.h:66
void initialize()
A method which is called the moment before the first call to the class is being made.
Definition: OFObject.m:263
void unload()
A method which is called when the class is unloaded from the runtime.
Definition: OFObject.m:259
of_comparison_result_t
A result of a comparison.
Definition: OFObject.h:42
id retain()
Increases the retain count.
void load()
A method which is called once when the class is loaded into the runtime.
Definition: OFObject.m:215
id autorelease()
Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack...
unsigned int retainCount()
Returns the retain count.
A class which provides portable threads.
Definition: OFThread.h:53
nullable Class superclass()
Returns the superclass of the class.
Definition: OFObject.m:297
void release()
Decreases the retain count.
bool isProxy()
Returns whether the object is a proxy object.
size_t location
Definition: OFObject.h:68
Class class()
Returns the class.
Definition: OFObject.m:277
of_byte_order_t
An enum for storing endianess.
Definition: OFObject.h:54