@@ -8,18 +8,17 @@ * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" -#import "OFComparable.h" /** * The OFArray class provides a class for storing dynamically sized arrays. * If you plan to store large hunks of data, you should consider using * OFBigArray, which allocates the memory in pages and not in bytes. */ -@interface OFArray: OFObject +@interface OFArray: OFObject { char *data; size_t itemsize; size_t items; } @@ -62,10 +61,26 @@ /** * \return All elements of the OFArray */ - (void*)data; +/** + * Clones the OFArray, creating a new one. + * + * \return A new autoreleased copy of the OFArray + */ +- (id)copy; + +/** + * Compares the OFArray to another object. + * + * \param obj An object to compare with + * \return An integer which is the result of the comparison, see for example + * strcmp + */ +- (int)compare: (id)obj; + /** * Returns a specific item of the OFArray. * * \param item The number of the item to return * \return The specified item of the OFArray @@ -97,17 +112,10 @@ * Removes a specified amount of the last items from the OFArray. * * \param nitems The number of items to remove */ - removeNItems: (size_t)nitems; - -/** - * Clones the OFArray, creating a new one. - * - * \return A new autoreleased copy of the OFArray - */ -- (id)copy; @end @interface OFBigArray: OFArray { size_t size;