52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/** @file */
/**
* @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;
#ifdef OF_HAVE_BLOCKS
/**
* @brief A comparator to compare two objects.
*
* @param left The left object
* @param right The right object
* @return The order of the objects
*/
typedef of_comparison_result_t (^of_comparator_t)(id _Nonnull left,
id _Nonnull right);
#endif
/**
* @brief An enum for storing endianess.
*/
typedef enum {
|
|
|
|
|
|
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/** @file */
/**
* @brief A result of a comparison.
*/
typedef enum {
/** The left object is smaller than the right */
OFOrderedAscending = -1,
/** Both objects are equal */
OFOrderedSame = 0,
/** The left object is bigger than the right */
OFOrderedDescending = 1
} OFComparisonResult;
#ifdef OF_HAVE_BLOCKS
/**
* @brief A comparator to compare two objects.
*
* @param left The left object
* @param right The right object
* @return The order of the objects
*/
typedef OFComparisonResult (^of_comparator_t)(id _Nonnull left,
id _Nonnull right);
#endif
/**
* @brief An enum for storing endianess.
*/
typedef enum {
|
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
|
@protocol OFComparing
/**
* @brief Compares the object to another object.
*
* @param object An object to compare the object to
* @return The result of the comparison
*/
- (of_comparison_result_t)compare: (id <OFComparing>)object;
@end
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
|
|
|
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
|
@protocol OFComparing
/**
* @brief Compares the object to another object.
*
* @param object An object to compare the object to
* @return The result of the comparison
*/
- (OFComparisonResult)compare: (id <OFComparing>)object;
@end
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
|