ObjFW  Diff

Differences From Artifact [a20b25debb]:

To Artifact [7cc08d97ce]:


159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185


186
187
188
189
190
191
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
233
234


235
236
237
238
239
240
241

#define OF_RETAIN_COUNT_MAX UINT_MAX
#define OF_NOT_FOUND SIZE_MAX

/*!
 * @brief A result of a comparison.
 */
typedef enum of_comparison_result_t {
	/*! The left object is smaller than the right */
	OF_ORDERED_ASCENDING = -1,
	/*! Both objects are equal */
	OF_ORDERED_SAME = 0,
	/*! The left object is bigger than the right */
	OF_ORDERED_DESCENDING = 1
} of_comparison_result_t;

/*!
 * @brief An enum for storing endianess.
 */
typedef enum of_byte_order_t {
	/*! Most significant byte first (big endian) */
	OF_BYTE_ORDER_BIG_ENDIAN,
	/*! Least significant byte first (little endian) */
	OF_BYTE_ORDER_LITTLE_ENDIAN
} of_byte_order_t;

/*!


 * @brief A range.
 */
typedef struct of_range_t {
	/*! The start of the range */
	size_t location;
	/*! The length of the range */
	size_t length;
} of_range_t;

/*!
 * @brief A time interval in seconds.
 */
typedef double of_time_interval_t;

/*!


 * @brief A point.
 */
typedef struct of_point_t {
	/*! The x coordinate of the point */
	float x;
	/*! The y coordinate of the point */
	float y;
} of_point_t;

/*!


 * @brief A dimension.
 */
typedef struct of_dimension_t {
	/*! The width of the dimension */
	float width;
	/*! The height of the dimension */
	float height;
} of_dimension_t;

/*!


 * @brief A rectangle.
 */
typedef struct of_rectangle_t
{
	/*! The point from where the rectangle originates */
	of_point_t origin;
	/*! The size of the rectangle */
	of_dimension_t size;
} of_rectangle_t;

@class OFString;
@class OFThread;

/*!


 * @brief The protocol which all root classes implement.
 */
@protocol OFObject
/*!
 * @brief Returns the class of the object.
 *
 * @return The class of the object







|











|







>
>


|












>
>


|







>
>


|







>
>


|
<










>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250

#define OF_RETAIN_COUNT_MAX UINT_MAX
#define OF_NOT_FOUND SIZE_MAX

/*!
 * @brief A result of a comparison.
 */
typedef enum {
	/*! The left object is smaller than the right */
	OF_ORDERED_ASCENDING = -1,
	/*! Both objects are equal */
	OF_ORDERED_SAME = 0,
	/*! The left object is bigger than the right */
	OF_ORDERED_DESCENDING = 1
} of_comparison_result_t;

/*!
 * @brief An enum for storing endianess.
 */
typedef enum {
	/*! Most significant byte first (big endian) */
	OF_BYTE_ORDER_BIG_ENDIAN,
	/*! Least significant byte first (little endian) */
	OF_BYTE_ORDER_LITTLE_ENDIAN
} of_byte_order_t;

/*!
 * @struct of_range_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A range.
 */
typedef struct {
	/*! The start of the range */
	size_t location;
	/*! The length of the range */
	size_t length;
} of_range_t;

/*!
 * @brief A time interval in seconds.
 */
typedef double of_time_interval_t;

/*!
 * @struct of_point_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A point.
 */
typedef struct {
	/*! The x coordinate of the point */
	float x;
	/*! The y coordinate of the point */
	float y;
} of_point_t;

/*!
 * @struct of_dimension_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A dimension.
 */
typedef struct {
	/*! The width of the dimension */
	float width;
	/*! The height of the dimension */
	float height;
} of_dimension_t;

/*!
 * @struct of_rectangle_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A rectangle.
 */
typedef struct {

	/*! The point from where the rectangle originates */
	of_point_t origin;
	/*! The size of the rectangle */
	of_dimension_t size;
} of_rectangle_t;

@class OFString;
@class OFThread;

/*!
 * @protocol OFObject OFObject.h ObjFW/OFObject.h
 *
 * @brief The protocol which all root classes implement.
 */
@protocol OFObject
/*!
 * @brief Returns the class of the object.
 *
 * @return The class of the object
403
404
405
406
407
408
409


410
411
412
413
414
415
416
 *
 * @return A boolean whether the object is a proxy object
 */
- (bool)isProxy;
@end

/*!


 * @brief The root class for all other classes inside ObjFW.
 */
OF_ROOT_CLASS
@interface OFObject <OFObject>
{
@private
	Class _isa;







>
>







412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
 *
 * @return A boolean whether the object is a proxy object
 */
- (bool)isProxy;
@end

/*!
 * @class OFObject OFObject.h ObjFW/OFObject.h
 *
 * @brief The root class for all other classes inside ObjFW.
 */
OF_ROOT_CLASS
@interface OFObject <OFObject>
{
@private
	Class _isa;
919
920
921
922
923
924
925


926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941


942
943
944
945
946
947
948
949
950
951
952
953
954
955
956


957
958
959
960
961
962
963
 *
 * @param selector The selector not understood by the receiver
 */
- (void)doesNotRecognizeSelector: (SEL)selector;
@end

/*!


 * @brief A protocol for the creation of copies.
 */
@protocol OFCopying
/*!
 * @brief Copies the object.
 *
 * For classes which can be immutable or mutable, this returns an immutable
 * copy. If only a mutable version of the class exists, it creates a mutable
 * copy.
 *
 * @return A copy of the object
 */
- copy;
@end

/*!


 * @brief A protocol for the creation of mutable copies.
 *
 * This protocol is implemented by objects that can be mutable and immutable
 * and allows returning a mutable copy.
 */
@protocol OFMutableCopying
/*!
 * @brief Creates a mutable copy of the object.
 *
 * @return A mutable copy of the object
 */
- mutableCopy;
@end

/*!


 * @brief A protocol for comparing objects.
 *
 * This protocol is implemented by objects that can be compared.
 */
@protocol OFComparing <OFObject>
/*!
 * @brief Compares the object with another object.







>
>
















>
>















>
>







930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
 *
 * @param selector The selector not understood by the receiver
 */
- (void)doesNotRecognizeSelector: (SEL)selector;
@end

/*!
 * @protocol OFCopying OFObject.h ObjFW/OFObject.h
 *
 * @brief A protocol for the creation of copies.
 */
@protocol OFCopying
/*!
 * @brief Copies the object.
 *
 * For classes which can be immutable or mutable, this returns an immutable
 * copy. If only a mutable version of the class exists, it creates a mutable
 * copy.
 *
 * @return A copy of the object
 */
- copy;
@end

/*!
 * @protocol OFMutableCopying OFObject.h ObjFW/OFObject.h
 *
 * @brief A protocol for the creation of mutable copies.
 *
 * This protocol is implemented by objects that can be mutable and immutable
 * and allows returning a mutable copy.
 */
@protocol OFMutableCopying
/*!
 * @brief Creates a mutable copy of the object.
 *
 * @return A mutable copy of the object
 */
- mutableCopy;
@end

/*!
 * @protocol OFComparing OFObject.h ObjFW/OFObject.h
 *
 * @brief A protocol for comparing objects.
 *
 * This protocol is implemented by objects that can be compared.
 */
@protocol OFComparing <OFObject>
/*!
 * @brief Compares the object with another object.