︙ | | |
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
-
+
-
+
-
+
-
+
|
/*!
* @brief Returns a boolean whether the object of the specified kind.
*
* @param class_ The class whose kind is checked
* @return A boolean whether the object is of the specified kind
*/
- (BOOL)isKindOfClass: (Class)class_;
- (bool)isKindOfClass: (Class)class_;
/*!
* @brief Returns a boolean whether the object is a member of the specified
* class.
*
* @param class_ The class for which the receiver is checked
* @return A boolean whether the object is a member of the specified class
*/
- (BOOL)isMemberOfClass: (Class)class_;
- (bool)isMemberOfClass: (Class)class_;
/*!
* @brief Returns a boolean whether the object responds to the specified
* selector.
*
* @param selector The selector which should be checked for respondance
* @return A boolean whether the objects responds to the specified selector
*/
- (BOOL)respondsToSelector: (SEL)selector;
- (bool)respondsToSelector: (SEL)selector;
/*!
* @brief Checks whether the object conforms to the specified protocol.
*
* @param protocol The protocol which should be checked for conformance
* @return A boolean whether the object conforms to the specified protocol
*/
- (BOOL)conformsToProtocol: (Protocol*)protocol;
- (bool)conformsToProtocol: (Protocol*)protocol;
/*!
* @brief Returns the implementation for the specified selector.
*
* @param selector The selector for which the method should be returned
* @return The implementation for the specified selector
*/
|
︙ | | |
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
-
+
|
*
* @warning If you reimplement this, you also need to reimplement @ref hash to
* return the same hash for objects which are equal!
*
* @param object The object which should be tested for equality
* @return A boolean whether the object is equal to the specified object
*/
- (BOOL)isEqual: (id)object;
- (bool)isEqual: (id)object;
/*!
* @brief Calculates a hash for the object.
*
* Classes containing data (like strings, arrays, lists etc.) should reimplement
* this!
*
|
︙ | | |
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
-
+
|
- self;
/*!
* @brief Returns whether the object is a proxy object.
*
* @return A boolean whether the object is a proxy object
*/
- (BOOL)isProxy;
- (bool)isProxy;
@end
/*!
* @brief The root class for all other classes inside ObjFW.
*/
@interface OFObject <OFObject>
{
|
︙ | | |
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
|
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
|
-
+
-
+
-
+
|
/*!
* @brief Returns a boolean whether the class is a subclass of the specified
* class.
*
* @param class_ The class which is checked for being a superclass
* @return A boolean whether the class is a subclass of the specified class
*/
+ (BOOL)isSubclassOfClass: (Class)class_;
+ (bool)isSubclassOfClass: (Class)class_;
/*!
* @brief Returns the superclass of the class.
*
* @return The superclass of the class
*/
+ (Class)superclass;
/*!
* @brief Checks whether instances of the class respond to a given selector.
*
* @param selector The selector which should be checked for respondance
* @return A boolean whether instances of the class respond to the specified
* selector
*/
+ (BOOL)instancesRespondToSelector: (SEL)selector;
+ (bool)instancesRespondToSelector: (SEL)selector;
/*!
* @brief Checks whether the class conforms to a given protocol.
*
* @param protocol The protocol which should be checked for conformance
* @return A boolean whether the class conforms to the specified protocol
*/
+ (BOOL)conformsToProtocol: (Protocol*)protocol;
+ (bool)conformsToProtocol: (Protocol*)protocol;
/*!
* @brief Returns the implementation of the instance method for the specified
* selector.
*
* @param selector The selector for which the method should be returned
* @return The implementation of the instance method for the specified selector
|
︙ | | |
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
|
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
|
-
+
-
+
|
* @brief Try to resolve the specified class method.
*
* This method is called if a class method was not found, so that an
* implementation can be provided at runtime.
*
* @return Whether the method has been added to the class
*/
+ (BOOL)resolveClassMethod: (SEL)selector;
+ (bool)resolveClassMethod: (SEL)selector;
/*!
* @brief Try to resolve the specified instance method.
*
* This method is called if an instance method was not found, so that an
* implementation can be provided at runtime.
*
* @return Whether the method has been added to the class
*/
+ (BOOL)resolveInstanceMethod: (SEL)selector;
+ (bool)resolveInstanceMethod: (SEL)selector;
/*!
* @brief Initializes an already allocated object.
*
* Derived classes may override this, but need to do
* @code
* self = [super init]
|
︙ | | |
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
|
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
|
-
+
-
+
-
+
-
+
-
+
-
+
|
*
* @param selector The selector to perform
* @param thread The thread on which to perform the selector
* @param waitUntilDone Whether to wait until the perform finished
*/
- (void)performSelector: (SEL)selector
onThread: (OFThread*)thread
waitUntilDone: (BOOL)waitUntilDone;
waitUntilDone: (bool)waitUntilDone;
/*!
* @brief Performs the specified selector on the specified thread with the
* specified object.
*
* @param selector The selector to perform
* @param thread The thread on which to perform the selector
* @param object The object that is passed to the method specified by the
* selector
* @param waitUntilDone Whether to wait until the perform finished
*/
- (void)performSelector: (SEL)selector
onThread: (OFThread*)thread
withObject: (id)object
waitUntilDone: (BOOL)waitUntilDone;
waitUntilDone: (bool)waitUntilDone;
/*!
* @brief Performs the specified selector on the specified thread with the
* specified objects.
*
* @param selector The selector to perform
* @param thread The thread on which to perform the selector
* @param object1 The first object that is passed to the method specified by the
* selector
* @param object2 The second object that is passed to the method specified by
* the selector
* @param waitUntilDone Whether to wait until the perform finished
*/
- (void)performSelector: (SEL)selector
onThread: (OFThread*)thread
withObject: (id)object1
withObject: (id)object2
waitUntilDone: (BOOL)waitUntilDone;
waitUntilDone: (bool)waitUntilDone;
/*!
* @brief Performs the specified selector on the main thread.
*
* @param selector The selector to perform
* @param waitUntilDone Whether to wait until the perform finished
*/
- (void)performSelectorOnMainThread: (SEL)selector
waitUntilDone: (BOOL)waitUntilDone;
waitUntilDone: (bool)waitUntilDone;
/*!
* @brief Performs the specified selector on the main thread with the specified
* object.
*
* @param selector The selector to perform
* @param object The object that is passed to the method specified by the
* selector
* @param waitUntilDone Whether to wait until the perform finished
*/
- (void)performSelectorOnMainThread: (SEL)selector
withObject: (id)object
waitUntilDone: (BOOL)waitUntilDone;
waitUntilDone: (bool)waitUntilDone;
/*!
* @brief Performs the specified selector on the main thread with the specified
* objects.
*
* @param selector The selector to perform
* @param object1 The first object that is passed to the method specified by the
* selector
* @param object2 The second object that is passed to the method specified by
* the selector
* @param waitUntilDone Whether to wait until the perform finished
*/
- (void)performSelectorOnMainThread: (SEL)selector
withObject: (id)object1
withObject: (id)object2
waitUntilDone: (BOOL)waitUntilDone;
waitUntilDone: (bool)waitUntilDone;
/*!
* @brief Performs the specified selector on the specified thread after the
* specified delay.
*
* @param selector The selector to perform
* @param thread The thread on which to perform the selector
|
︙ | | |
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
|
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
|
-
+
|
withObject: (id)object1
withObject: (id)object2
afterDelay: (double)delay;
#endif
/*!
* @brief This method is called when @ref resolveClassMethod: or
* @ref resolveInstanceMethod: returned NO. It should return a target
* @ref resolveInstanceMethod: returned false. It should return a target
* to which the message should be forwarded.
*
* @note When the message should not be forwarded, you should not return nil,
* but instead return the result of the superclass!
*
* @return The target to forward the message to
*/
|
︙ | | |