Differences From Artifact [0bcf5ccb1b]:
- File src/OFObject.h — part of check-in [f1d6ecb1b8] at 2011-07-23 13:33:44 on branch trunk — Add -[self] to OFObject. (user: js, size: 15073) [annotate] [blame] [check-ins using]
To Artifact [250cefa1d6]:
- File
src/OFObject.h
— part of check-in
[bf0f10966f]
at
2011-07-29 21:54:36
on branch trunk
— Add +[inheritInstanceMethodsFromClass:] to OFObject.
This allows something similar to multiple inheritance. (user: js, size: 15999) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
374 375 376 377 378 379 380 381 382 383 384 385 386 387 | * \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 Initializes an already allocated object. * * Derived classes may override this, but need to do self = [super init] before * they do any initialization themselves. init may never return nil, instead * an exception (for example OFInitializationFailed) should be thrown. * | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | * \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 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 instance methods from the specified class to the class that * is the receiver. * * Existing methods will not be overriden, so that it behaves similar to normal * inheritance. * * \param class The class from which the instance methods should be inherited */ + (void)inheritInstanceMethodsFromClass: (Class)class; /** * \brief Initializes an already allocated object. * * Derived classes may override this, but need to do self = [super init] before * they do any initialization themselves. init may never return nil, instead * an exception (for example OFInitializationFailed) should be thrown. * |
︙ | ︙ |