Overview
Comment: | OFSet: Add a few new methods to create new sets. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
12fef9798a59a12ebabeddf01c31909f |
User & Date: | js on 2012-12-12 22:02:55 |
Other Links: | manifest | tags |
Context
2012-12-13
| ||
20:53 | Add of_tls_socket_class for 3rd-party TLS libs. check-in: 1abe5a111f user: js tags: trunk | |
2012-12-12
| ||
22:02 | OFSet: Add a few new methods to create new sets. check-in: 12fef9798a user: js tags: trunk | |
18:57 | Small conformance fix for OFHTTPServer + OFURL. check-in: 41480893fc user: js tags: trunk | |
Changes
Modified src/OFMutableSet.h from [df687701d6] to [b275ea1cd2].
︙ | ︙ | |||
31 32 33 34 35 36 37 | * @brief Removes the specified object from the set. * * @param object The object to remove from the set */ - (void)removeObject: (id)object; /*! | | | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | * @brief Removes the specified object from the set. * * @param object The object to remove from the set */ - (void)removeObject: (id)object; /*! * @brief Removes all objects from the receiver which are in the specified set. * * @param set The set whose objects will be removed from the receiver */ - (void)minusSet: (OFSet*)set; /*! * @brief Removes all objects from the receiver which are not in the specified * set. * * @param set The set to intersect with */ - (void)intersectSet: (OFSet*)set; /*! * @brief Creates a union of the receiver and the specified set. * * @param set The set to create the union with |
︙ | ︙ |
Modified src/OFSet.h from [2a615a7348] to [7443a8dee9].
︙ | ︙ | |||
140 141 142 143 144 145 146 147 148 149 150 151 152 153 | * object in common. * * @return Whether the receiver and the specified set have at least one object * in common */ - (BOOL)intersectsSet: (OFSet*)set; #ifdef OF_HAVE_BLOCKS /*! * @brief Executes a block for each object in the set. * * @param block The block to execute for each object in the set */ - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block; | > > > > > > > > > > > > > > > > > > > > > > > > | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | * object in common. * * @return Whether the receiver and the specified set have at least one object * in common */ - (BOOL)intersectsSet: (OFSet*)set; /*! * @brief Creates a new set which contains the objects which are in the * receiver, but not in the specified set. * * @param set The set whose objects will not be in the new set */ - (OFSet*)setBySubtractingSet: (OFSet*)set; /*! * @brief Creates a new set by creating the intersection of the receiver and * the specified set. * * @param set The set to intersect with */ - (OFSet*)setByIntersectingWithSet: (OFString*)set; /*! * @brief Creates a new set by creating the union of the receiver and the * specified set. * * @param set The set to create the union with */ - (OFSet*)setByAddingSet: (OFSet*)set; #ifdef OF_HAVE_BLOCKS /*! * @brief Executes a block for each object in the set. * * @param block The block to execute for each object in the set */ - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block; |
︙ | ︙ |
Modified src/OFSet.m from [da395819f0] to [f4c7729752].
︙ | ︙ | |||
387 388 389 390 391 392 393 394 395 396 397 398 399 400 | [element retain]; objc_autoreleasePoolPop(pool); return [element autorelease]; } #if defined(OF_HAVE_BLOCKS) && defined(OF_HAVE_FAST_ENUMERATION) - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block { BOOL stop = NO; for (id object in self) { | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | [element retain]; objc_autoreleasePoolPop(pool); return [element autorelease]; } - (OFSet*)setBySubtractingSet: (OFSet*)set { OFMutableSet *new; new = [[self mutableCopy] autorelease]; [new minusSet: set]; [new makeImmutable]; return new; } - (OFSet*)setByIntersectingWithSet: (OFSet*)set { OFMutableSet *new; new = [[self mutableCopy] autorelease]; [new intersectSet: set]; [new makeImmutable]; return new; } - (OFSet*)setByAddingSet: (OFSet*)set { OFMutableSet *new; new = [[self mutableCopy] autorelease]; [new unionSet: set]; [new makeImmutable]; return new; } #if defined(OF_HAVE_BLOCKS) && defined(OF_HAVE_FAST_ENUMERATION) - (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block { BOOL stop = NO; for (id object in self) { |
︙ | ︙ |