Differences From Artifact [49adfd1a99]:
- File src/OFDictionary.h — part of check-in [c5d65603d8] at 2010-08-28 18:54:35 on branch trunk — Initial support for blocks. (user: js, size: 4784) [annotate] [blame] [check-ins using]
To 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]
︙ | ︙ | |||
19 20 21 22 23 24 25 | #ifdef OF_HAVE_BLOCKS typedef void (^of_dictionary_enumeration_block_t)(id key, id obj, BOOL *stop); #endif /// \cond internal struct of_dictionary_bucket { | | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #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. */ |
︙ | ︙ | |||
62 63 64 65 66 67 68 | /** * Creates a new OFDictionary with the specified key and object. * * \param key The key * \param obj The object * \return A new autoreleased OFDictionary */ | | | | | 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 92 93 94 95 | /** * Creates a new OFDictionary with the specified key and object. * * \param key The key * \param obj The object * \return A new autoreleased OFDictionary */ + dictionaryWithObject: (id)obj forKey: (id <OFCopying>)key; /** * Creates a new OFDictionary with the specified keys and objects. * * \param keys An array of keys * \param objs An array of objects * \return A new autoreleased OFDictionary */ + dictionaryWithObjects: (OFArray*)objs forKeys: (OFArray*)keys; /** * Creates a new OFDictionary with the specified keys objects. * * \param key The first key * \return A new autoreleased OFDictionary */ + dictionaryWithKeysAndObjects: (id <OFCopying>)key, ...; /** * Initializes an already allocated OFDictionary. * * \return An initialized OFDictionary */ - init; |
︙ | ︙ | |||
107 108 109 110 111 112 113 | * Initializes an already allocated OFDictionary with the specified key and * object. * * \param key The key * \param obj The object * \return A new initialized OFDictionary */ | | | | | | | 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 161 162 163 164 | * Initializes an already allocated OFDictionary with the specified key and * object. * * \param key The key * \param obj The object * \return A new initialized OFDictionary */ - initWithObject: (id)obj forKey: (id <OFCopying>)key; /** * Initializes an already allocated OFDictionary with the specified keys and * objects. * * \param keys An array of keys * \param objs An array of objects * \return A new initialized OFDictionary */ - initWithObjects: (OFArray*)objs forKeys: (OFArray*)keys; /** * Initializes an already allocated OFDictionary with the specified keys and * objects. * * \param first The first key * \return A new initialized OFDictionary */ - initWithKeysAndObjects: (id <OFCopying>)first, ...; /** * Initializes an already allocated OFDictionary with the specified key and * va_list. * * \param first The first key * \param args A va_list of the other arguments * \return A new initialized OFDictionary */ - initWithKey: (id <OFCopying>)first argList: (va_list)args; /** * Returns the object for the given key or nil if the key was not found. * * The returned object is <i>not</i> retained and autoreleased for performance * 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 The number of objects in the dictionary */ - (size_t)count; /** |
︙ | ︙ |