Differences From Artifact [63820ae3f4]:
- File
src/OFDictionary.h
— part of check-in
[e2b06423e0]
at
2010-09-05 23:19:08
on branch trunk
— Replace OFObject* with id in many places.
We assume now that every object understands retain, release, etc. so
that we can weaken the type from OFObject* to id. This makes it
possible to use different root object classes. (user: js, size: 4702) [annotate] [blame] [check-ins using]
To Artifact [5d0f2c3365]:
- File src/OFDictionary.h — part of check-in [ba19e68fb6] at 2010-09-05 23:33:12 on branch trunk — Add OFCollection protocol. (user: js, size: 4477) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #include <stdarg.h> #import "OFObject.h" #import "OFEnumerator.h" @class OFArray; #ifdef OF_HAVE_BLOCKS typedef void (^of_dictionary_enumeration_block_t)(id key, id obj, BOOL *stop); #endif /// \cond internal struct of_dictionary_bucket { id <OFCopying> key; id object; uint32_t hash; }; /// \endcond /** * \brief A class for storing objects in a hash table. */ | > | < < < < | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #include <stdarg.h> #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" @class OFArray; #ifdef OF_HAVE_BLOCKS typedef void (^of_dictionary_enumeration_block_t)(id key, id obj, BOOL *stop); #endif /// \cond internal struct of_dictionary_bucket { id <OFCopying> key; id object; uint32_t hash; }; /// \endcond /** * \brief A class for storing objects in a hash table. */ @interface OFDictionary: OFObject <OFCopying, OFMutableCopying, OFCollection, OFFastEnumeration> { struct of_dictionary_bucket **data; uint32_t size; size_t count; } /** * Creates a new OFDictionary. * * \return A new autoreleased OFDictionary */ + dictionary; |
︙ | ︙ | |||
152 153 154 155 156 157 158 | * reasons! * * \param key The key whose object should be returned * \return The object for the given key or nil if the key was not found */ - (id)objectForKey: (id)key; | < < < < < < < < < < | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | * reasons! * * \param key The key whose object should be returned * \return The object for the given key or nil if the key was not found */ - (id)objectForKey: (id)key; /** * \return An OFEnumerator to enumerate through the dictionary's keys */ - (OFEnumerator*)keyEnumerator; #ifdef OF_HAVE_BLOCKS /** |
︙ | ︙ |