Index: src/OFCollection.h ================================================================== --- src/OFCollection.h +++ src/OFCollection.h @@ -17,11 +17,11 @@ #import "OFEnumerator.h" /** * \brief A protocol with methods common for all collections. */ -@protocol OFCollection +@protocol OFCollection #ifdef OF_HAVE_PROPERTIES @property (readonly) size_t count; #endif /** @@ -29,18 +29,10 @@ * * \return The number of objects in the collection */ - (size_t)count; -/** - * \brief Returns an OFEnumerator to enumerate through all objects of the - * collection. - * - * \returns An OFEnumerator to enumerate through all objects of the collection - */ -- (OFEnumerator*)objectEnumerator; - /** * \brief Checks whether the collection contains an object equal to the * specified object. * * \param The object which is checked for being in the collection Index: src/OFEnumerator.h ================================================================== --- src/OFEnumerator.h +++ src/OFEnumerator.h @@ -13,10 +13,25 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" + +@class OFEnumerator; + +/** + * \brief A protocol for getting an enumerator for the object. + */ +@protocol OFEnumerating +/** + * \brief Returns an OFEnumerator to enumerate through all objects of the + * collection. + * + * \returns An OFEnumerator to enumerate through all objects of the collection + */ +- (OFEnumerator*)objectEnumerator; +@end /** * \brief A class which provides methods to enumerate through collections. */ @interface OFEnumerator: OFObject