The protocol which all root classes implement.
More...
#import <ObjFW/OFObject.h>
The protocol which all root classes implement.
◆ allowsWeakReference()
- (bool) allowsWeakReference |
|
|
|
Returns whether the class allows weak references.
- Returns
- Whether the class allows weak references
◆ autorelease()
Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack.
- Returns
- The object
◆ class()
Returns the class of the object.
- Returns
- The class of the object
Reimplemented in OFObject.
◆ conformsToProtocol:()
- (bool) conformsToProtocol: |
|
(Protocol *) |
protocol |
|
Checks whether the object conforms to the specified protocol.
- Parameters
-
protocol | The protocol which should be checked for conformance |
- Returns
- A boolean whether the object conforms to the specified protocol
Reimplemented in OFObject.
◆ hash()
Calculates a hash for the object.
Classes containing data (like strings, arrays, lists etc.) should reimplement this!
- Warning
- If you reimplement this, you also need to reimplement isEqual: to behave in a way compatible to your reimplementation of this method!
- Returns
- A 32 bit hash for the object
◆ isEqual:()
- (bool) isEqual: |
|
(nullable id) |
object |
|
Checks two objects for equality.
Classes containing data (like strings, arrays, lists etc.) should reimplement this!
- Warning
- If you reimplement this, you also need to reimplement hash to return the same hash for objects which are equal!
- Parameters
-
object | The object which should be tested for equality |
- Returns
- A boolean whether the object is equal to the specified object
◆ isKindOfClass:()
- (bool) isKindOfClass: |
|
(Class) |
class_ |
|
Returns a boolean whether the object of the specified kind.
- Parameters
-
class_ | The class whose kind is checked |
- Returns
- A boolean whether the object is of the specified kind
◆ isMemberOfClass:()
- (bool) isMemberOfClass: |
|
(Class) |
class_ |
|
Returns a boolean whether the object is a member of the specified class.
- Parameters
-
class_ | The class for which the receiver is checked |
- Returns
- A boolean whether the object is a member of the specified class
◆ isProxy()
Returns whether the object is a proxy object.
- Returns
- A boolean whether the object is a proxy object
◆ methodForSelector:()
- (nullable IMP) methodForSelector: |
|
(SEL) |
selector |
|
Returns the implementation for the specified selector.
- Parameters
-
selector | The selector for which the method should be returned |
- Returns
- The implementation for the specified selector
◆ performSelector:()
- (nullable id) performSelector: |
|
(SEL) |
selector |
|
Performs the specified selector.
- Parameters
-
selector | The selector to perform |
- Returns
- The object returned by the method specified by the selector
◆ performSelector:withObject:()
- (nullable id) performSelector: |
|
(SEL) |
selector |
withObject: |
|
(nullable id) |
object |
|
|
| |
Performs the specified selector with the specified object.
- Parameters
-
selector | The selector to perform |
object | The object that is passed to the method specified by the selector |
- Returns
- The object returned by the method specified by the selector
◆ performSelector:withObject:withObject:()
- (nullable id) performSelector: |
|
(SEL) |
selector |
withObject: |
|
(nullable id) |
object1 |
withObject: |
|
(nullable id) |
object2 |
|
|
| |
Performs the specified selector with the specified objects.
- Parameters
-
selector | The selector to perform |
object1 | The first object that is passed to the method specified by the selector |
object2 | The second object that is passed to the method specified by the selector |
- Returns
- The object returned by the method specified by the selector
◆ release()
Decreases the retain count.
Each time an object is released, the retain count gets decreased and the object deallocated if it reaches 0.
Reimplemented in OFAutoreleasePool.
◆ respondsToSelector:()
- (bool) respondsToSelector: |
|
(SEL) |
selector |
|
Returns a boolean whether the object responds to the specified selector.
- Parameters
-
selector | The selector which should be checked for respondence |
- Returns
- A boolean whether the objects responds to the specified selector
◆ retain()
Increases the retain count.
Each time an object is released, the retain count gets decreased and the object deallocated if it reaches 0.
◆ retainCount()
- (unsigned int) retainCount |
|
|
|
Returns the retain count.
- Returns
- The retain count
◆ retainWeakReference()
- (bool) retainWeakReference |
|
|
|
Retain a weak reference to this object.
- Returns
- Whether a weak reference to this object has been retained
◆ self()
Returns the receiver.
- Returns
- The receiver
◆ superclass()
- (nullable Class) superclass |
|
|
|
Returns the superclass of the object.
- Returns
- The superclass of the object
Reimplemented in OFObject.
◆ typeEncodingForSelector:()
- (nullable const char *) typeEncodingForSelector: |
|
(SEL) |
selector |
|
Returns the type encoding for the specified selector.
- Parameters
-
selector | The selector for which the type encoding should be returned |
- Returns
- The type encoding for the specified selector
The documentation for this protocol was generated from the following file: