ObjFW  Diff

Differences From Artifact [da75a58c99]:

To Artifact [4f3cbb67f1]:


23
24
25
26
27
28
29


30
31
32
33
34
35
36
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38







+
+








#include <stdarg.h>

#import "OFObject.h"
#import "OFCollection.h"
#import "OFSerialization.h"

OF_ASSUME_NONNULL_BEGIN

/*! @file */

@class OFArray OF_GENERIC(ObjectType);

#ifdef OF_HAVE_BLOCKS
/*!
 * @brief A block for enumerating an OFSet.
101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
103
104
105
106
107
108
109

110
111
112
113
114
115
116
117







-
+







/*!
 * @brief Creates a new set with the specified objects.
 *
 * @param objects An array of objects for the set
 * @param count The number of objects in the specified array
 * @return A new, autoreleased set with the specified objects
 */
+ (instancetype)setWithObjects: (ObjectType const*)objects
+ (instancetype)setWithObjects: (__nonnull ObjectType const *__nonnull)objects
			 count: (size_t)count;

/*!
 * @brief Initializes an already allocated set with the specified set.
 *
 * @param set The set to initialize the set with
 * @return An initialized set with the specified set
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151







-
+







/*!
 * @brief Initializes an already allocated set with the specified objects.
 *
 * @param objects An array of objects for the set
 * @param count The number of objects in the specified array
 * @return An initialized set with the specified objects
 */
- initWithObjects: (ObjectType const*)objects
- initWithObjects: (__nonnull ObjectType const *__nonnull)objects
	    count: (size_t)count;

/*!
 * @brief Initializes an already allocated set with the specified object and
 *	  va_list.
 *
 * @param firstObject The first object for the set
213
214
215
216
217
218
219
220

221
222
223
224
225
226
227
215
216
217
218
219
220
221

222
223
224
225
226
227
228
229







-
+







/*!
 * @brief Checks whether the set contains an object equal to the specified
 *	  object.
 *
 * @param object The object which is checked for being in the set
 * @return A boolean whether the set contains the specified object
 */
- (bool)containsObject: (ObjectType)object;
- (bool)containsObject: (nullable ObjectType)object;

/*!
 * @brief Returns an OFEnumerator to enumerate through all objects of the set.
 *
 * @returns An OFEnumerator to enumerate through all objects of the set
 */
- (OFEnumerator OF_GENERIC(ObjectType)*)objectEnumerator;
244
245
246
247
248
249
250
251


252
246
247
248
249
250
251
252
253
254
255
256








+
+

- (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"