@@ -13,10 +13,14 @@ #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 { OFObject *key; @@ -164,10 +168,20 @@ /** * \return An OFEnumerator to enumerate through the dictionary's keys */ - (OFEnumerator*)keyEnumerator; + +#ifdef OF_HAVE_BLOCKS +/** + * Executes a block for each key / object pair. + * + * \param block The block to execute for each key / object pair. + */ +- (void)enumerateKeysAndObjectsUsingBlock: + (of_dictionary_enumeration_block_t)block; +#endif @end /// \cond internal @interface OFDictionaryEnumerator: OFEnumerator {