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;
653 - (
void *)allocMemoryWithSize: (
size_t)size;
665 - (
void *)allocMemoryWithSize: (
size_t)size
666 count: (size_t)count;
678 - (nullable
void *)resizeMemory: (nullable
void *)pointer
693 - (nullable
void *)resizeMemory: (nullable
void *)pointer
695 count: (
size_t)count;
704 - (void)freeMemory: (nullable
void *)pointer;
721 - (void)performSelector: (
SEL)selector
733 - (void)performSelector: (
SEL)selector
734 withObject: (nullable id)
object 748 - (void)performSelector: (
SEL)selector
749 withObject: (nullable id)object1
750 withObject: (nullable
id)object2
753 #ifdef OF_HAVE_THREADS 761 - (void)performSelector: (
SEL)selector
763 waitUntilDone: (
bool)waitUntilDone;
775 - (void)performSelector: (
SEL)selector
777 withObject: (nullable
id)
object 778 waitUntilDone: (bool)waitUntilDone;
792 - (void)performSelector: (
SEL)selector
794 withObject: (nullable
id)object1
795 withObject: (nullable id)object2
796 waitUntilDone: (
bool)waitUntilDone;
804 - (void)performSelectorOnMainThread: (
SEL)selector
805 waitUntilDone: (bool)waitUntilDone;
816 - (void)performSelectorOnMainThread: (
SEL)selector
817 withObject: (nullable id)
object 818 waitUntilDone: (
bool)waitUntilDone;
831 - (void)performSelectorOnMainThread: (
SEL)selector
832 withObject: (nullable id)object1
833 withObject: (nullable
id)object2
834 waitUntilDone: (bool)waitUntilDone;
844 - (void)performSelector: (
SEL)selector
858 - (void)performSelector: (
SEL)selector
860 withObject: (nullable
id)
object 875 - (void)performSelector: (
SEL)selector
877 withObject: (nullable
id)object1
878 withObject: (nullable id)object2
893 - (nullable id)forwardingTargetForSelector: (
SEL)selector;
903 - (void)doesNotRecognizeSelector: (
SEL)selector OF_NO_RETURN;
955 - (of_comparison_result_t)compare: (id <OFComparing>)object;
961 extern id of_alloc_object(Class class_,
size_t extraSize,
962 size_t extraAlignment,
void *_Nullable *_Nullable extra);
963 extern void OF_NO_RETURN_FUNC of_method_not_found(
id self,
SEL _cmd);
964 extern uint32_t of_hash_seed;
969 OF_ASSUME_NONNULL_END
971 #import "OFObject+KeyValueCoding.h" 972 #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:933
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:912
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
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