453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
|
+ (BOOL)addInstanceMethod: (SEL)selector
withTypeEncoding: (const char*)typeEncoding
implementation: (IMP)implementation
{
#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
return class_addMethod(self, selector, implementation, typeEncoding);
#elif defined(OF_OLD_GNU_RUNTIME)
@throw [OFNotImplementedException newWithClass: self
selector: _cmd];
#endif
}
+ (void)inheritInstanceMethodsFromClass: (Class)class
{
|
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
|
+ (BOOL)addInstanceMethod: (SEL)selector
withTypeEncoding: (const char*)typeEncoding
implementation: (IMP)implementation
{
#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
return class_addMethod(self, selector, implementation, typeEncoding);
#else
@throw [OFNotImplementedException newWithClass: self
selector: _cmd];
#endif
}
+ (BOOL)addClassMethod: (SEL)selector
withTypeEncoding: (const char*)typeEncoding
implementation: (IMP)implementation
{
#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
return class_addMethod(((OFObject*)self)->isa, selector, implementation,
typeEncoding);
#else
@throw [OFNotImplementedException newWithClass: self
selector: _cmd];
#endif
}
+ (void)inheritInstanceMethodsFromClass: (Class)class
{
|