ObjFW  Diff

Differences From Artifact [37e4450eb1]:

To Artifact [38b992ba28]:


372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
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
449

450
451
452
453
454
455
456
457
458
 *
 * This is mostly for debugging purposes.
 *
 * \return A description for the class, which is usually the class name
 */
+ (OFString*)description;

/**
 * \brief Replaces a class method implementation with another implementation.
 *
 * \param newImp The new implementation for the class method
 * \param selector The selector of the class method to replace
 * \return The old implementation
 */
+ (IMP)setImplementation: (IMP)newImp
	  forClassMethod: (SEL)selector;

/**
 * \brief Replaces a class method with a class method from another class.
 *
 * \param selector The selector of the class method to replace
 * \param class_ The class from which the new class method should be taken
 * \return The old implementation
 */
+ (IMP)replaceClassMethod: (SEL)selector
      withMethodFromClass: (Class)class_;

/**
 * \brief Replaces an instance method implementation with another
 *	  implementation.
 *
 * \param newImp The new implementation for the instance method
 * \param selector The selector of the instance method to replace
 * \return The old implementation
 */
+ (IMP)setImplementation: (IMP)newImp
       forInstanceMethod: (SEL)selector;

/**
 * \brief Replaces an instance method with an instance method from another
 *	  class.
 *
 * \param selector The selector of the instance method to replace
 * \param class_ The class from which the new instance method should be taken
 * \return The old implementation
 */
+ (IMP)replaceInstanceMethod: (SEL)selector
	 withMethodFromClass: (Class)class_;

/**
 * \brief Adds a class method to the class.
 *
 * If the method already exists, nothing is done and NO is returned. If you want
 * to change the implementation of a method, use
 * setImplementation:forClassMethod:.
 *
 * \param selector The selector for the new method

 * \param typeEncoding The type encoding for the new method
 * \param implementation The implementation for the new method
 * \return Whether the method has been added
 */
+ (BOOL)addClassMethod: (SEL)selector

      withTypeEncoding: (const char*)typeEncoding
	implementation: (IMP)implementation;

/**
 * \brief Adds an instance method to the class.
 *
 * If the method already exists, nothing is done and NO is returned. If you want
 * to change the implementation of a method, use
 * setImplementation:forInstanceMethod:.
 *
 * \param selector The selector for the new method

 * \param typeEncoding The type encoding for the new method
 * \param implementation The implementation for the new method
 * \return Whether the method has been added
 */
+ (BOOL)addInstanceMethod: (SEL)selector

	 withTypeEncoding: (const char*)typeEncoding
	   implementation: (IMP)implementation;

/**
 * \brief Adds all methods from the specified class to the class that is the
 *	  receiver.
 *
 * Methods implemented by the receiving class itself will not be overridden,
 * however methods implemented by its superclass will. Therefore it behaves







<
<
<
<
<
<
<
<
<
<










<
<
<
<
<
<
<
<
<
<
<












|

|
|
|


>

|
<

|
>
|
<


|

|
|
|


>

|
<

|
>
|
<







372
373
374
375
376
377
378










379
380
381
382
383
384
385
386
387
388











389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
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
 *
 * This is mostly for debugging purposes.
 *
 * \return A description for the class, which is usually the class name
 */
+ (OFString*)description;











/**
 * \brief Replaces a class method with a class method from another class.
 *
 * \param selector The selector of the class method to replace
 * \param class_ The class from which the new class method should be taken
 * \return The old implementation
 */
+ (IMP)replaceClassMethod: (SEL)selector
      withMethodFromClass: (Class)class_;












/**
 * \brief Replaces an instance method with an instance method from another
 *	  class.
 *
 * \param selector The selector of the instance method to replace
 * \param class_ The class from which the new instance method should be taken
 * \return The old implementation
 */
+ (IMP)replaceInstanceMethod: (SEL)selector
	 withMethodFromClass: (Class)class_;

/**
 * \brief Replaces or adds a class method.
 *
 * If the method already exists, it is replaced and the old implementation
 * returned. If the method does not exist, it is added with the specified type
 * encoding.
 *
 * \param selector The selector for the new method
 * \param implementation The implementation for the new method
 * \param typeEncoding The type encoding for the new method
 * \return The old implementation or nil if the method was added

 */
+ (IMP)replaceClassMethod: (SEL)selector
       withImplementation: (IMP)implementation
	     typeEncoding: (const char*)typeEncoding;


/**
 * \brief Replaces or adds an instance method.
 *
 * If the method already exists, it is replaced and the old implementation
 * returned. If the method does not exist, it is added with the specified type
 * encoding.
 *
 * \param selector The selector for the new method
 * \param implementation The implementation for the new method
 * \param typeEncoding The type encoding for the new method
 * \return The old implementation or nil if the method was added

 */
+ (IMP)replaceInstanceMethod: (SEL)selector
	  withImplementation: (IMP)implementation
		typeEncoding: (const char*)typeEncoding;


/**
 * \brief Adds all methods from the specified class to the class that is the
 *	  receiver.
 *
 * Methods implemented by the receiving class itself will not be overridden,
 * however methods implemented by its superclass will. Therefore it behaves