ObjFW  Diff

Differences From Artifact [48306f95d4]:

To Artifact [b570ea6601]:


56
57
58
59
60
61
62
63
64
65

66
67
68
69
70
71
72
73
74
75
76
77
78
 * @class OFSet OFSet.h ObjFW/OFSet.h
 *
 * @brief An abstract class for an unordered set of unique objects.
 *
 * @warning Do not mutate objects that are in a set! Changing the hash of
 *	    objects in a set breaks the internal representation of the set!
 */
#ifdef OF_HAVE_GENERICS
@interface OFSet<ObjectType>:
#else

# ifndef DOXYGEN
#  define ObjectType id
# endif
@interface OFSet:
#endif
    OFObject <OFCollection, OFCopying, OFMutableCopying, OFSerialization>
/*!
 * @brief Creates a new set.
 *
 * @return A new, autoreleased set
 */
+ (instancetype)set;








<
|
<
>
|
|
<
<

<







56
57
58
59
60
61
62

63

64
65
66


67

68
69
70
71
72
73
74
 * @class OFSet OFSet.h ObjFW/OFSet.h
 *
 * @brief An abstract class for an unordered set of unique objects.
 *
 * @warning Do not mutate objects that are in a set! Changing the hash of
 *	    objects in a set breaks the internal representation of the set!
 */

@interface OFSet OF_GENERIC(ObjectType): OFObject <OFCollection, OFCopying,

    OFMutableCopying, OFSerialization>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id


#endif

/*!
 * @brief Creates a new set.
 *
 * @return A new, autoreleased set
 */
+ (instancetype)set;

273
274
275
276
277
278
279
280
281
282
283

284
285
286
287
 *
 * @param block A block which determines if the object should be in the new set
 * @return A new, autoreleased OFSet
 */
- (OFSet OF_GENERIC(ObjectType) *)filteredSetUsingBlock:
    (of_set_filter_block_t)block;
#endif
@end
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef ObjectType
#endif


OF_ASSUME_NONNULL_END

#import "OFMutableSet.h"







<



>




269
270
271
272
273
274
275

276
277
278
279
280
281
282
283
 *
 * @param block A block which determines if the object should be in the new set
 * @return A new, autoreleased OFSet
 */
- (OFSet OF_GENERIC(ObjectType) *)filteredSetUsingBlock:
    (of_set_filter_block_t)block;
#endif

#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef ObjectType
#endif
@end

OF_ASSUME_NONNULL_END

#import "OFMutableSet.h"