ObjFW  Diff

Differences From Artifact [b67f49f2af]:

To Artifact [75b9a0dc79]:


116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
 * \param selector The selector for which the method should be returned
 * \return The implementation of the instance method for the specified selector
 *	   or nil if it isn't implemented
 */
+ (IMP)instanceMethodForSelector: (SEL)selector;

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

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

/**
 * 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.







|

|
|



|


|

|
|


|
|







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
 * \param selector The selector for which the method should be returned
 * \return The implementation of the instance method for the specified selector
 *	   or nil if it isn't implemented
 */
+ (IMP)instanceMethodForSelector: (SEL)selector;

/**
 * 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;

/**
 * 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
  withInstanceMethodFromClass: (Class)class_;

/**
 * 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.