Comment: | Clean up the class hierarchy in the doxygen generated documentation. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
367bf4117b29cdda50734ba4f26c0c63 |
User & Date: | js on 2011-08-22 09:58:10 |
Other Links: | manifest | tags |
2011-08-22
| ||
10:10 | Small optimization in -[OFDictionary_hashtable initWithDictionary:]. check-in: ba9f2608cc user: js tags: trunk | |
09:58 | Clean up the class hierarchy in the doxygen generated documentation. check-in: 367bf4117b user: js tags: trunk | |
2011-08-21
| ||
21:11 | Don't install headers for implementations of abstract classes. check-in: b9191c784b user: js tags: trunk | |
Modified src/OFDictionary.h from [661b980566] to [ec216f0268].
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | + + | BOOL *stop); typedef BOOL (^of_dictionary_filter_block_t)(id key, id object); typedef id (^of_dictionary_map_block_t)(id key, id object); #endif /** * \brief An abstract class for storing objects in a dictionary. * * Keys are copied and thus must conform to the OFCopying protocol. * * Note: Fast enumeration on a dictionary enumerates through the keys of the * dictionary. */ @interface OFDictionary: OFObject <OFCopying, OFMutableCopying, OFCollection, OFSerialization> /** |
︙ | |||
57 58 59 60 61 62 63 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + - + | * \brief Creates a new OFDictionary with the specified key and object. * * \param key The key * \param object The object * \return A new autoreleased OFDictionary */ + dictionaryWithObject: (id)object |
︙ | |||
102 103 104 105 106 107 108 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - + - + - + - + | * and object. * * \param key The key * \param object The object * \return A new initialized OFDictionary */ - initWithObject: (id)object |
︙ |
Modified src/OFDictionary.m from [cb8d68b6da] to [3cc46ccafd].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | - initWithDictionary: (OFDictionary*)dictionary { return (id)[[OFDictionary_hashtable alloc] initWithDictionary: dictionary]; } - initWithObject: (id)object |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + - + | + dictionaryWithDictionary: (OFDictionary*)dictionary { return [[[self alloc] initWithDictionary: dictionary] autorelease]; } + dictionaryWithObject: (id)object |
︙ | |||
177 178 179 180 181 182 183 | 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 | - + - + - + - + | Class c = isa; [self release]; @throw [OFNotImplementedException newWithClass: c selector: _cmd]; } - initWithObject: (id)object |
︙ | |||
247 248 249 250 251 252 253 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + | return [[OFMutableDictionary alloc] initWithDictionary: self]; } - (BOOL)isEqual: (id)dictionary { OFAutoreleasePool *pool; OFEnumerator *enumerator; |
︙ | |||
311 312 313 314 315 316 317 318 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | + - + - | } - (OFArray*)allKeys { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; id *cArray = [self allocMemoryForNItems: [self count] withSize: sizeof(id)]; OFArray *ret; OFEnumerator *enumerator; |
︙ | |||
341 342 343 344 345 346 347 348 349 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | + - | } - (OFArray*)allObjects { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; id *cArray = [self allocMemoryForNItems: [self count] withSize: sizeof(id)]; OFArray *ret; OFEnumerator *enumerator; id object; |
︙ | |||
392 393 394 395 396 397 398 | 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 | - + | #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFEnumerator *enumerator = [self keyEnumerator]; |
︙ | |||
438 439 440 441 442 443 444 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | - + | } #endif - (uint32_t)hash { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFEnumerator *enumerator = [self keyEnumerator]; |
︙ | |||
498 499 500 501 502 503 504 | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | - + | - (OFXMLElement*)XMLElementBySerializing { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFAutoreleasePool *pool2; OFXMLElement *element; OFEnumerator *keyEnumerator, *objectEnumerator; |
︙ |
Modified src/OFDictionary_hashtable.h from [bc1f7945d5] to [5e6091e296].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - - + | * file. */ #import "OFDictionary.h" struct of_dictionary_hashtable_bucket { |
︙ |
Modified src/OFDictionary_hashtable.m from [2ec4537eb9] to [5217ffcc95].
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | - + | - initWithDictionary: (OFDictionary*)dictionary { self = [super init]; @try { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFEnumerator *enumerator; |
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - + | @throw e; } return self; } - initWithObject: (id)object |
︙ | |||
297 298 299 300 301 302 303 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - + | break; } /* Key not in dictionary */ if (j >= last || data[j] == NULL || ![data[j]->key isEqual: keysCArray[i]]) { struct of_dictionary_hashtable_bucket *bucket; |
︙ | |||
361 362 363 364 365 366 367 | 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | - + | [self release]; @throw e; } return self; } |
︙ | |||
427 428 429 430 431 432 433 | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | - + | bucket->hash = hash; data[j] = bucket; for (i = 1; i < count; i++) { uint32_t last; |
︙ | |||
578 579 580 581 582 583 584 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | - + | [self release]; @throw e; } return self; } |
︙ |
Modified src/OFEnumerator.h from [992da1f406] to [4677a6d4a2].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + | #import "OFObject.h" @class OFEnumerator; /** * \brief A protocol for getting an enumerator for the object. */ |
︙ |
Modified src/OFMutableDictionary.h from [0667a7eb0a] to [41532865ea].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - + | * * A key can be any object that conforms to the OFCopying protocol. * * \param key The key to set * \param object The object to set the key to */ - (void)setObject: (id)object |
︙ |
Modified src/OFMutableDictionary.m from [0c649f32e0] to [1646e68d29].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + - + | - initWithDictionary: (OFDictionary*)dictionary { return (id)[[OFMutableDictionary_hashtable alloc] initWithDictionary: dictionary]; } - initWithObject: (id)object |
︙ |
Modified src/OFMutableDictionary_hashtable.m from [c6660be1ea] to [ba31392df4].
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | - + - + | old = data[i]->object; data[i]->object = [object retain]; [old release]; } - (void)setObject: (id)object |
︙ |
Modified src/OFObject.h from [7e695cf1f5] to [8c882f215e].
︙ | |||
574 575 576 577 578 579 580 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - + - + | */ - (void)finalize; @end /** * \brief A protocol for the creation of copies. */ |
︙ |
Modified src/OFSerialization.h from [34e6599afb] to [fbbc513813].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + | #define OF_SERIALIZATION_NS @"https://webkeks.org/objfw/serialization" @class OFXMLElement; /** * \brief A protocol for serializing objects. */ |
︙ |
Modified src/OFXMLElement+Serialization.m from [fb80388119] to [8af8aee9f9].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + | int _OFXMLElement_Serialization_reference; @implementation OFXMLElement (Serialization) - (id)objectByDeserializing { OFAutoreleasePool *pool; Class class; |
︙ |